mirror of
https://github.com/pipipi-pikachu/PPTist.git
synced 2025-04-15 02:20:00 +08:00
fix: 插入元素后未清除【准备插入】状态(#39)
This commit is contained in:
parent
35e16acbb1
commit
c23d9c32aa
@ -28,6 +28,7 @@ export default () => {
|
|||||||
const fontColor = computed(() => store.state.theme.fontColor)
|
const fontColor = computed(() => store.state.theme.fontColor)
|
||||||
const fontName = computed(() => store.state.theme.fontName)
|
const fontName = computed(() => store.state.theme.fontName)
|
||||||
const viewportRatio = computed(() => store.state.viewportRatio)
|
const viewportRatio = computed(() => store.state.viewportRatio)
|
||||||
|
const creatingElement = computed(() => store.state.creatingElement)
|
||||||
|
|
||||||
const { addHistorySnapshot } = useHistorySnapshot()
|
const { addHistorySnapshot } = useHistorySnapshot()
|
||||||
|
|
||||||
@ -35,6 +36,9 @@ export default () => {
|
|||||||
const createElement = (element: PPTElement) => {
|
const createElement = (element: PPTElement) => {
|
||||||
store.commit(MutationTypes.ADD_ELEMENT, element)
|
store.commit(MutationTypes.ADD_ELEMENT, element)
|
||||||
store.commit(MutationTypes.SET_ACTIVE_ELEMENT_ID_LIST, [element.id])
|
store.commit(MutationTypes.SET_ACTIVE_ELEMENT_ID_LIST, [element.id])
|
||||||
|
|
||||||
|
if (creatingElement.value) store.commit(MutationTypes.SET_CREATING_ELEMENT, null)
|
||||||
|
|
||||||
addHistorySnapshot()
|
addHistorySnapshot()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user