forked from github/dataease
fix(数据大屏): 修复组合相关问题多选大屏图表后,拖动边框后组合出现隐藏组件等问题
This commit is contained in:
parent
f5508ebbde
commit
5eec729cc1
@ -1273,12 +1273,12 @@ export const dvMainStore = defineStore('dataVisualization', {
|
|||||||
}
|
}
|
||||||
this.canvasStyleData = { ...deepCopy(DEFAULT_CANVAS_STYLE_DATA_DARK), backgroundColor: null }
|
this.canvasStyleData = { ...deepCopy(DEFAULT_CANVAS_STYLE_DATA_DARK), backgroundColor: null }
|
||||||
},
|
},
|
||||||
removeGroupArea() {
|
removeGroupArea(curComponentData = this.componentData) {
|
||||||
// 清理临时组件
|
// 清理临时组件
|
||||||
const groupAreaHis = this.componentData.filter(ele => ele.component === 'GroupArea')
|
const groupAreaHis = curComponentData.filter(ele => ele.component === 'GroupArea')
|
||||||
if (groupAreaHis && groupAreaHis.length > 0) {
|
if (groupAreaHis && groupAreaHis.length > 0) {
|
||||||
groupAreaHis.forEach(ele => {
|
groupAreaHis.forEach(ele => {
|
||||||
this.deleteComponentById(ele.id)
|
this.deleteComponentById(ele.id, curComponentData)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -154,10 +154,11 @@ export const snapshotStore = defineStore('snapshot', {
|
|||||||
recordSnapshot() {
|
recordSnapshot() {
|
||||||
this.styleChangeTimes = ++this.styleChangeTimes
|
this.styleChangeTimes = ++this.styleChangeTimes
|
||||||
if (dataPrepareState.value) {
|
if (dataPrepareState.value) {
|
||||||
dvMainStore.removeGroupArea()
|
const snapshotComponentData = deepCopy(componentData.value)
|
||||||
|
dvMainStore.removeGroupArea(snapshotComponentData)
|
||||||
// 添加新的快照
|
// 添加新的快照
|
||||||
const newSnapshot = {
|
const newSnapshot = {
|
||||||
componentData: deepCopy(componentData.value),
|
componentData: snapshotComponentData,
|
||||||
canvasStyleData: deepCopy(canvasStyleData.value),
|
canvasStyleData: deepCopy(canvasStyleData.value),
|
||||||
canvasViewInfo: deepCopy(canvasViewInfo.value),
|
canvasViewInfo: deepCopy(canvasViewInfo.value),
|
||||||
cacheViewIdInfo: deepCopy(this.cacheViewIdInfo),
|
cacheViewIdInfo: deepCopy(this.cacheViewIdInfo),
|
||||||
|
Loading…
Reference in New Issue
Block a user