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 48bfcb8825..18e5224515 100644 --- a/core/core-frontend/src/store/modules/data-visualization/copy.ts +++ b/core/core-frontend/src/store/modules/data-visualization/copy.ts @@ -77,7 +77,7 @@ export const copyStore = defineStore('copy', { }) }, copy() { - if (curComponent.value) { + if (curComponent.value && curComponent.value.component !== 'GroupArea') { this.copyDataInfo([curComponent.value]) } else if (composeStore.areaData.components.length) { this.copyDataInfo(composeStore.areaData.components) @@ -136,7 +136,7 @@ export const copyStore = defineStore('copy', { snapshotStore.recordSnapshotCache() }, cut(curComponentData = componentData.value) { - if (curComponent.value) { + if (curComponent.value && curComponent.value.component !== 'GroupArea') { this.copyDataInfo([curComponent.value]) dvMainStore.deleteComponentById(curComponent.value.id, curComponentData) } else if (composeStore.areaData.components.length) { diff --git a/core/core-frontend/src/utils/DeShortcutKey.ts b/core/core-frontend/src/utils/DeShortcutKey.ts index 13fcc990e7..dc6a7758bb 100644 --- a/core/core-frontend/src/utils/DeShortcutKey.ts +++ b/core/core-frontend/src/utils/DeShortcutKey.ts @@ -235,7 +235,7 @@ function preview() { } function deleteComponent() { - if (curComponent.value) { + if (curComponent.value && curComponent.value.component !== 'GroupArea') { const curInfo = getCurInfo() if (curInfo) { dvMainStore.deleteComponent(curInfo.index, curInfo.componentData)