fix:修复拖拽节点,顺序错误bug
This commit is contained in:
parent
34d0006f55
commit
11d4f2de95
@ -140,7 +140,7 @@ export async function moveNode(info) {
|
|||||||
//移动节点相对于目标节点位置的增量
|
//移动节点相对于目标节点位置的增量
|
||||||
let addIndex = info.dropPosition > index ? 1 : 0;
|
let addIndex = info.dropPosition > index ? 1 : 0;
|
||||||
body.sort = target.sort + addIndex;
|
body.sort = target.sort + addIndex;
|
||||||
targetList.splice(addIndex, 0, current);
|
targetList.splice(index + addIndex, 0, current);
|
||||||
for (let i = index + 1; i < targetList.length; i++) {
|
for (let i = index + 1; i < targetList.length; i++) {
|
||||||
targetList[i].sort += 1;
|
targetList[i].sort += 1;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user