mirror of
https://github.com/dataease/dataease.git
synced 2026-05-15 05:22:13 +08:00
fix(图表): 修复拖拽多个字段到数据列指定位置时顺序颠倒 #17490
This commit is contained in:
@@ -1944,7 +1944,7 @@ const drop = (ev: MouseEvent, type = 'xAxis') => {
|
||||
const targetId = ev.srcElement.offsetParent?.querySelector('.node-id_private')?.dataset?.id
|
||||
const index = view.value[type].findIndex(ele => ele.id === targetId && ele.id !== obj.id)
|
||||
if (index !== -1) {
|
||||
view.value[type].splice(index + 1, 0, obj)
|
||||
view.value[type].splice(index + 1 + i, 0, obj)
|
||||
} else {
|
||||
view.value[type].push(obj)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user