Skip to content

Commit a1abf33

Browse files
committed
fix: correct new position calculation in drag-and-drop functionality
1 parent 78bfee7 commit a1abf33

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ui/src/views/paragraph/index.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -314,8 +314,8 @@ function openGenerateDialog(row?: any) {
314314
315315
function onEnd(event?: any) {
316316
const obj = {
317-
paragraph_id: paragraphDetail.value[event.newIndex].id,
318-
new_position: paragraphDetail.value[event.newIndex].position,
317+
paragraph_id: paragraphDetail.value[event.newIndex].id, // 当前拖动的段落ID
318+
new_position: paragraphDetail.value[event.newIndex+1].position, // 新位置的段落位置
319319
}
320320
loadSharedApi({ type: 'paragraph', systemType: apiType.value }).putAdjustPosition(
321321
id,

0 commit comments

Comments
 (0)