From a0110835cfd60385e2d9a5d11e8f5b05a14f5e29 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Fri, 8 Mar 2024 10:05:05 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E4=BB=AA=E8=A1=A8=E6=9D=BF):=20?= =?UTF-8?q?=E4=BB=AA=E8=A1=A8=E6=9D=BF=E5=86=85=E9=80=9A=E8=BF=87=E5=A4=8D?= =?UTF-8?q?=E5=88=B6=E7=BB=84=E4=BB=B6=E5=90=91=E7=94=BB=E5=B8=83=E5=86=85?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=96=B0=E7=BB=84=E4=BB=B6=EF=BC=8C=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E9=80=89=E4=B8=AD=E6=96=B0=E6=B7=BB=E5=8A=A0=E7=9A=84?= =?UTF-8?q?=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/store/modules/data-visualization/copy.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/core/core-frontend/src/store/modules/data-visualization/copy.ts b/core/core-frontend/src/store/modules/data-visualization/copy.ts index 8eefad469e..0609115f42 100644 --- a/core/core-frontend/src/store/modules/data-visualization/copy.ts +++ b/core/core-frontend/src/store/modules/data-visualization/copy.ts @@ -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)