fix(数据大屏): 修复数据大屏批量锁定失效问题 #12783

This commit is contained in:
wangjiahao 2024-11-05 09:54:22 +08:00
parent 7b9f9c6bec
commit ce797b2621
2 changed files with 15 additions and 9 deletions

View File

@ -37,8 +37,14 @@ const popComponentDataLength = computed(
)
const lock = () => {
if (curComponent.value && !isGroupArea.value) {
lockStore.lock()
} else if (areaData.value.components.length) {
areaData.value.components.forEach(component => {
lockStore.lock(component)
})
}
snapshotStore.recordSnapshotCache()
lockStore.lock()
menuOpt('lock')
}

View File

@ -7,19 +7,19 @@ const { curComponent } = storeToRefs(dvMainStore)
export const lockStore = defineStore('lock', {
actions: {
lock() {
curComponent.value.isLock = true
if (curComponent.value.component === 'Group') {
curComponent.value.propValue.forEach(component => {
lock(optComponent = curComponent.value) {
optComponent.isLock = true
if (optComponent.component === 'Group') {
optComponent.propValue.forEach(component => {
component.isLock = true
})
}
},
unlock() {
curComponent.value.isLock = false
if (curComponent.value.component === 'Group') {
curComponent.value.propValue.forEach(component => {
unlock(optComponent = curComponent.value) {
optComponent.isLock = false
if (optComponent.component === 'Group') {
optComponent.propValue.forEach(component => {
component.isLock = false
})
}