refactor(仪表板): 仪表板内通过复制组件向画布内增加新组件,默认选中新添加的组件

This commit is contained in:
wangjiahao 2024-03-08 10:05:05 +08:00
parent 6affa68a65
commit a0110835cf

View File

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