1.0.2 • Published 7 years ago
vue-draggable-directive v1.0.2
![]()
vue-draggable
a simple draggable directive of Vue Try this demo
How to use
npm i vue-draggable-directive --save-devimport Vue from 'vue'
import VueDraggable from 'vue-draggable-directive'
Vue.use(VueDraggable)// only draggable
<div v-draggable></div>
// clone
<div v-draggable="{clone: true}"></div>
// ...API(Directive Value)
| key | type | value |
|---|---|---|
| clone | Boolean | true/false |
| boundingRect | Object | {top: x, right: x, bottom: x, left: x} |
| onPosChange | Function | Params: type: String: moushDown/MouseMove/MouseUpel: HTMLElementpos: Object: {x: xx, y: yy} |