Merge pull request #12378 from dataease/pr@dev-v2@fix_batch

Pr@dev v2@fix batch
This commit is contained in:
王嘉豪 2024-09-23 15:03:56 +08:00 committed by GitHub
commit 9204fc6ede
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -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) {

View File

@ -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)