fix(图表): 修复图表添加新的字段后,存量图表在将字段拖入时报错的问题

This commit is contained in:
jianneng-fit2cloud 2024-07-24 13:23:01 +08:00
parent aa925c969e
commit ce0d071a7e

View File

@ -1645,6 +1645,7 @@ const drop = (ev: MouseEvent, type = 'xAxis') => {
for (let i = 0; i < arr.length; i++) {
const obj = cloneDeep(arr[i])
state.moveId = obj.id as unknown as number
view.value[type] ??= []
view.value[type].push(obj)
const e = { newDraggableIndex: view.value[type].length - 1 }