安装第三方插件
import Sortable from 'sortablejs
可以跟后端商议表格添加seq 顺序, 按照循序排序
secondInput 调用 修改接口api 然后重新获取数据
//在get 请求之后 使用nextTick 使用
const rowDrop = () => {
nextTick(() => {
let xTable2 = planDataRef.value;
let sortable = Sortable.create(
xTable2.$el.querySelector(".body--wrapper>.vxe-table--body tbody"),
{
handle: ".vxe-body--row",
animation: 150,
onEnd: ({ newIndex, oldIndex }) => {
console.log(newIndex);
console.log(oldIndex);
planDetail.value[oldIndex].seq = newIndex + 1;
secondInput(planDetail.value[oldIndex], true);
console.log(planDetail.value, "planD1111etail.value");
},
}
);
});
};










