Merge pull request #11143 from dataease/pr@dev-v2@chart-new-search-field-fix

fix(图表): 修复图表添加新的字段后,存量图表在将字段拖入时报错的问题
This commit is contained in:
jianneng-fit2cloud 2024-07-24 13:23:54 +08:00 committed by GitHub
commit 2923194712
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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 }