diff --git a/core/core-frontend/src/components/data-visualization/canvas/CanvasCore.vue b/core/core-frontend/src/components/data-visualization/canvas/CanvasCore.vue index 6f2bb96b5a..94cc340f4c 100644 --- a/core/core-frontend/src/components/data-visualization/canvas/CanvasCore.vue +++ b/core/core-frontend/src/components/data-visualization/canvas/CanvasCore.vue @@ -1362,7 +1362,10 @@ const groupAreaChange = (showArea, style?) => { groupArea.style.height = style.height dvMainStore.addComponent({ component: groupArea, index: undefined }) } else { - dvMainStore.deleteComponentById(100000001) + const groupAreaHis = componentData.value.filter(ele => ele.id === 100000001) + if (groupAreaHis && groupAreaHis.length > 0) { + dvMainStore.deleteComponentById(100000001) + } } }) } diff --git a/core/core-frontend/src/store/modules/data-visualization/compose.ts b/core/core-frontend/src/store/modules/data-visualization/compose.ts index 78f277edc4..fae03ec5af 100644 --- a/core/core-frontend/src/store/modules/data-visualization/compose.ts +++ b/core/core-frontend/src/store/modules/data-visualization/compose.ts @@ -104,7 +104,7 @@ export const composeStore = defineStore('compose', { areaData.components = [] return } - if (areaData.components.length > 0 && areaData.style.width === 0) { + if (areaData.components.length > 0) { // 计算组合区域 this.calcComposeArea() }