Skip to content

Commit a011083

Browse files
committed
refactor(仪表板): 仪表板内通过复制组件向画布内增加新组件,默认选中新添加的组件
1 parent 6affa68 commit a011083

File tree

1 file changed

+6
-1
lines changed
  • core/core-frontend/src/store/modules/data-visualization

1 file changed

+6
-1
lines changed

core/core-frontend/src/store/modules/data-visualization/copy.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,12 @@ export const copyStore = defineStore('copy', {
118118
}
119119
eventBus.emit('addDashboardItem-' + newComponent.canvasId, newComponent)
120120
}
121-
121+
if (i === dataArray.length - 1) {
122+
dvMainStore.setCurComponent({
123+
component: newComponent,
124+
index: componentData.value.length - 1
125+
})
126+
}
122127
i++
123128
}
124129
}, moveTime)

0 commit comments

Comments
 (0)