Merge pull request #8412 from dataease/pr@dev-v2@refactor_copy

refactor(仪表板): 仪表板内通过复制组件向画布内增加新组件,默认选中新添加的组件
This commit is contained in:
王嘉豪 2024-03-08 10:06:11 +08:00 committed by GitHub
commit ff143974b2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -118,7 +118,12 @@ export const copyStore = defineStore('copy', {
}
eventBus.emit('addDashboardItem-' + newComponent.canvasId, newComponent)
}
if (i === dataArray.length - 1) {
dvMainStore.setCurComponent({
component: newComponent,
index: componentData.value.length - 1
})
}
i++
}
}, moveTime)