mirror of
https://github.com/pipipi-pikachu/PPTist.git
synced 2025-04-15 02:20:00 +08:00
fix: 修复组合元素无法解除锁定
This commit is contained in:
parent
bb73efacd6
commit
d5c30f59e0
@ -31,20 +31,26 @@ export default () => {
|
||||
const newElementList: PPTElement[] = JSON.parse(JSON.stringify(currentSlide.value.elements))
|
||||
|
||||
if (handleElement.groupId) {
|
||||
const groupElementIdList = []
|
||||
for (const element of newElementList) {
|
||||
if (element.groupId === handleElement.groupId) element.lock = false
|
||||
if (element.groupId === handleElement.groupId) {
|
||||
element.lock = false
|
||||
groupElementIdList.push(element.id)
|
||||
}
|
||||
}
|
||||
return newElementList
|
||||
slidesStore.updateSlide({ elements: newElementList })
|
||||
mainStore.setActiveElementIdList(groupElementIdList)
|
||||
}
|
||||
|
||||
for (const element of newElementList) {
|
||||
if (element.id === handleElement.id) {
|
||||
element.lock = false
|
||||
break
|
||||
else {
|
||||
for (const element of newElementList) {
|
||||
if (element.id === handleElement.id) {
|
||||
element.lock = false
|
||||
break
|
||||
}
|
||||
}
|
||||
slidesStore.updateSlide({ elements: newElementList })
|
||||
mainStore.setActiveElementIdList([handleElement.id])
|
||||
}
|
||||
slidesStore.updateSlide({ elements: newElementList })
|
||||
mainStore.setActiveElementIdList([handleElement.id])
|
||||
addHistorySnapshot()
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user