Merge pull request #9266 from dataease/pr@dev-v2_st

fix(仪表板): 修复使用批量拖拽字段,重复添加指标字段,图表指标显示异常
This commit is contained in:
dataeaseShu 2024-04-23 14:13:59 +08:00 committed by GitHub
commit 305aff6cc9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1394,7 +1394,7 @@ const drop = (ev: MouseEvent, type = 'xAxis') => {
const obj = cloneDeep(arr[i]) const obj = cloneDeep(arr[i])
state.moveId = obj.id as unknown as number state.moveId = obj.id as unknown as number
view.value[type].push(obj) view.value[type].push(obj)
const e = { newDraggableIndex: view.value.xAxis.length - 1 } const e = { newDraggableIndex: view.value[type].length - 1 }
if ('drillFields' === type) { if ('drillFields' === type) {
addDrill(e) addDrill(e)
} else if (type === 'customFilter') { } else if (type === 'customFilter') {