vue3 + ts + element-plus + sortable.js实现表格行的拖拽
vue3 + ts + element-plus + sortable.js实现表格行的拖拽1. 安装sortable.js使用npm install sortable.js --save 或者 yarn add sortable.js2.引入sortable.jsimport Sortable from 'sortablejs3.具体API可以看文档https://www.itxst.com/s
·
1. 安装sortable.js
使用npm install sortablejs --save 或者 yarn add sortablejs
2.引入sortable.js
import Sortable from 'sortablejs
3.具体API可以看文档
https://www.itxst.com/sortablejs
4.代码如下图
rowDrap()方法初始化拖拽
onEnd()是拖拽结束的事件
更多推荐
已为社区贡献4条内容
所有评论(0)