Merge pull request #13203 from dataease/pr@dev-v2@refactor_hidden
refactor(数据大屏): 数据大屏支持批量隐藏
This commit is contained in:
commit
575e747ea2
@ -81,14 +81,26 @@ const copy = () => {
|
||||
}
|
||||
|
||||
const hide = () => {
|
||||
if (curComponent.value && !isGroupArea.value) {
|
||||
layerStore.hideComponentWithComponent()
|
||||
} else if (areaData.value.components.length) {
|
||||
areaData.value.components.forEach(component => {
|
||||
layerStore.hideComponentWithComponent(component.id)
|
||||
})
|
||||
}
|
||||
snapshotStore.recordSnapshotCache()
|
||||
layerStore.hideComponent()
|
||||
menuOpt('hide')
|
||||
}
|
||||
|
||||
const show = () => {
|
||||
if (curComponent.value && !isGroupArea.value) {
|
||||
layerStore.showComponent()
|
||||
} else if (areaData.value.components.length) {
|
||||
areaData.value.components.forEach(component => {
|
||||
layerStore.showComponent(component.id)
|
||||
})
|
||||
}
|
||||
snapshotStore.recordSnapshotCache()
|
||||
layerStore.showComponent()
|
||||
menuOpt('show')
|
||||
}
|
||||
const categoryChange = type => {
|
||||
|
||||
@ -60,6 +60,13 @@ export const layerStore = defineStore('layer', {
|
||||
}
|
||||
},
|
||||
|
||||
hideComponentWithComponent(componentId?) {
|
||||
const targetComponent = getComponentById(componentId)
|
||||
// 隐藏
|
||||
if (targetComponent) {
|
||||
targetComponent.isShow = false
|
||||
}
|
||||
},
|
||||
hideComponent(componentId?) {
|
||||
const targetComponent = getComponentById(componentId)
|
||||
// 隐藏
|
||||
|
||||
Loading…
Reference in New Issue
Block a user