解决代码生成的查询条件列表拖拽报错问题

This commit is contained in:
zhoumingfa 2025-04-08 17:30:20 +08:00
parent 33c93ae365
commit 393cb325c7
4 changed files with 6 additions and 6 deletions

View File

@ -41,7 +41,7 @@
<a-table <a-table
size="small" size="small"
:scroll="{ x: 1000 }" :scroll="{ y: 800 }"
:loading="tableLoading" :loading="tableLoading"
bordered bordered
:dataSource="tableData" :dataSource="tableData"

View File

@ -178,8 +178,8 @@
chosenClass: 'smart-ghost-class', // chosenClass: 'smart-ghost-class', //
handle: '.handle', handle: '.handle',
onEnd: ({ oldIndex, newIndex }) => { onEnd: ({ oldIndex, newIndex }) => {
const oldRow = tableData.value.splice(oldIndex, 1)[0]; const oldRow = tableData.value.splice(oldIndex - 1, 1)[0];
tableData.value.splice(newIndex, 0, oldRow); tableData.value.splice(newIndex - 1, 0, oldRow);
}, },
}); });
} }

View File

@ -41,7 +41,7 @@
<a-table <a-table
size="small" size="small"
:scroll="{ x: 1000 }" :scroll="{ y: 800 }"
:loading="tableLoading" :loading="tableLoading"
bordered bordered
:dataSource="tableData" :dataSource="tableData"

View File

@ -178,8 +178,8 @@
chosenClass: 'smart-ghost-class', // chosenClass: 'smart-ghost-class', //
handle: '.handle', handle: '.handle',
onEnd: ({ oldIndex, newIndex }) => { onEnd: ({ oldIndex, newIndex }) => {
const oldRow = tableData.value.splice(oldIndex, 1)[0]; const oldRow = tableData.value.splice(oldIndex - 1, 1)[0];
tableData.value.splice(newIndex, 0, oldRow); tableData.value.splice(newIndex - 1, 0, oldRow);
}, },
}); });
} }