From 69b4451e914818c9e9698f693c4ca2955150bfa8 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Tue, 8 Apr 2025 22:03:26 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E4=BB=AA=E8=A1=A8=E6=9D=BF):=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E5=B0=86=E7=BB=84=E4=BB=B6=E7=A7=BB=E5=85=A5Tab?= =?UTF-8?q?=E9=87=8C=20Tab=E5=8F=AF=E8=83=BD=E4=BC=9A=E6=B6=88=E5=A4=B1?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../custom-component/de-tabs/Component.vue | 35 +++++++++---------- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/core/core-frontend/src/custom-component/de-tabs/Component.vue b/core/core-frontend/src/custom-component/de-tabs/Component.vue index 60d13a17a5..8283c543d2 100644 --- a/core/core-frontend/src/custom-component/de-tabs/Component.vue +++ b/core/core-frontend/src/custom-component/de-tabs/Component.vue @@ -416,25 +416,22 @@ const componentMoveIn = component => { if (editableTabsValue.value === tabItem.name) { //获取主画布当前组件的index if (isDashboard()) { - const curIndex = findComponentIndexByIdWithFilterHidden(component.id) - if (curIndex > -1) { - eventBus.emit('removeMatrixItem-canvas-main', curIndex) - dvMainStore.setCurComponent({ component: null, index: null }) - component.canvasId = element.value.id + '--' + tabItem.name - const refInstance = currentInstance.refs['tabCanvas_' + index][0] - if (refInstance) { - const matrixBase = refInstance.getBaseMatrixSize() //矩阵基础大小 - canvasChangeAdaptor(component, matrixBase) - component.x = 1 - component.y = 200 - component.style.left = 0 - component.style.top = 0 - tabItem.componentData.push(component) - refInstance.addItemBox(component) //在适当的时候初始化布局组件 - nextTick(() => { - refInstance.canvasInitImmediately() - }) - } + eventBus.emit('removeMatrixItemById-canvas-main', component.id) + dvMainStore.setCurComponent({ component: null, index: null }) + component.canvasId = element.value.id + '--' + tabItem.name + const refInstance = currentInstance.refs['tabCanvas_' + index][0] + if (refInstance) { + const matrixBase = refInstance.getBaseMatrixSize() //矩阵基础大小 + canvasChangeAdaptor(component, matrixBase) + component.x = 1 + component.y = 200 + component.style.left = 0 + component.style.top = 0 + tabItem.componentData.push(component) + refInstance.addItemBox(component) //在适当的时候初始化布局组件 + nextTick(() => { + refInstance.canvasInitImmediately() + }) } } else { const curIndex = findComponentIndexById(component.id)