vue拖拽插件(弹框拖拽)

// =======拖拽 插件
cnpm install vuedraggable
import draggable from 'vuedraggable'





{{element.id}}


data() {
return {
msg: 'Welcome to Your Vue.js App',
tags: [{
id: 1
}, {
id: 2
}]
}
},
methods: {
getdata(evt) {
console.log(evt.draggedContext.element.id)
},
datadragEnd(evt) {
console.log('拖动前的索引 :' + evt.oldIndex)
console.log('拖动后的索引 :' + evt.newIndex)
console.log(this.tags)
}
},

 

转载于:https://www.cnblogs.com/sx00/p/10913915.html

你可能感兴趣的:(vue拖拽插件(弹框拖拽))