sortablejs插件在el-table中的运用
概述需求
有一个Table表格,由于数据是根据自增的ID进行排序显示的,有时了调整顺序会在数据库中直接操作数据表,来达到调整数据顺序的目的,因为为了实现在页面实现较为简单的拖拽排序...newIndexList: [],
}
},
mounted() {
// 复制原Table的id按循序存储newIndexList中,
// 每一次调整位置会对....create(el, {
animation: 150,
sort: true,
draggable: '.el-table__row', // 设置可拖拽行的类名....create(el, {
animation: 150,
sort: true,
draggable: '.el-table__row', // 设置可拖拽行的类名...newIndexList: [],
}
},
mounted() {
// 复制原Table的id按循序存储newIndexList中,
// 每一次调整位置会对