vue2-dnd

Drag n' Drop plugin for Vue.js
2,111 12
Install
npm install vue2-dnd
Latest Version:1.0.1
License:MIT
Last Updated:Jan 6, 2017
Links: GitHub  ·  npm
Maintainer: jikkai

vue2-dnd

img img

Drag n' Drop plugin for Vue.js

Installation

npm install vue2-dnd --save

Usage

import Vue2Dnd from 'vue2-dnd'

Vue.use(Vue2Dnd)

Draggable Directive

v-draggable.[groupname]="[draggable object]"
<template>
  <div v-draggable.groupname="item"></div>
</template>

<script>
  export default {
    data () {
      return {
        key: item.key,
        name: item.name
      }
    }
  }
</script>

Droppable Directive

v-draggable.[groupname]="[droppable callback function]"
<template>
  <div v-droppable.groupname="callback"></div>
</template>

<script>
  export default {
    methods: {
      callback ($ev) {
        // $ev contains the draggable object
      }
    }
  }
</script>

License

MIT

Related Packages

vue-reactivestorage

Reactive layer for interacting with localStorage from Vue.

1,283 126
@morgul/snowpack-plugin-vue2

A snowpack vue2 compiler based on `@snowpack/plugin-vue`.

9,507 6
@vitely/vue2

Vitely for vue 2.7

2,251 0
plugin-auto-script-jsx

auto set script lang='jsx' when you use jsx

180
@dullar/mercury

Advanced and highly reusable Mobile UI Components built on Vue2 & You can define...

8,553 6

Version History

Version Released License
1.0.1 MIT
1.0.0 MIT