使用Sortable.js实现 el-table的拖拽功能
使用Sortable.js实现 el-table的拖拽功能
之前的需求是实现el-table表格的拖拽功能,由于只需要实现行的拖拽排序所有就找了个插件Sortable.js;
在Vue中使用
安装:npm install sortablejs --save
在组件内引入
import Sortable from "sortablejs";
然后再methods中使用方法在mounted中调用
mounted() {
this.rowDrop()
},
watch: {
原创
2021-05-21 11:24:28 ·
418 阅读 ·
0 评论