forked from github/dataease
fix: 修复图表剪切后选择其他组件可直接对剪切图表组合并显示问题
This commit is contained in:
parent
278cee6d20
commit
afe73c918b
@ -53,8 +53,12 @@ const menuOpt = optName => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const cut = () => {
|
const cut = () => {
|
||||||
const curInfo = getCurInfo()
|
if (curComponent.value) {
|
||||||
copyStore.cut(curInfo.componentData)
|
const curInfo = getCurInfo()
|
||||||
|
copyStore.cut(curInfo.componentData)
|
||||||
|
} else if (areaData.value.components.length) {
|
||||||
|
copyStore.cut()
|
||||||
|
}
|
||||||
menuOpt('cut')
|
menuOpt('cut')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -129,6 +129,15 @@ export const copyStore = defineStore('copy', {
|
|||||||
composeStore.areaData.components.forEach(component => {
|
composeStore.areaData.components.forEach(component => {
|
||||||
dvMainStore.deleteComponentById(component.id)
|
dvMainStore.deleteComponentById(component.id)
|
||||||
})
|
})
|
||||||
|
composeStore.setAreaData({
|
||||||
|
style: {
|
||||||
|
left: 0,
|
||||||
|
top: 0,
|
||||||
|
width: 0,
|
||||||
|
height: 0
|
||||||
|
},
|
||||||
|
components: []
|
||||||
|
})
|
||||||
}
|
}
|
||||||
snapshotStore.recordSnapshotCache()
|
snapshotStore.recordSnapshotCache()
|
||||||
this.isCut = true
|
this.isCut = true
|
||||||
|
Loading…
Reference in New Issue
Block a user