fix: 修复添加元素后无法直接ctrl+z 撤销

This commit is contained in:
missile 2021-07-23 13:22:54 +08:00
parent 2391f56f20
commit ecee368b02

View File

@ -38,7 +38,9 @@ export default () => {
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) if (creatingElement.value) store.commit(MutationTypes.SET_CREATING_ELEMENT, null)
setTimeout(() => {
store.commit(MutationTypes.SET_EDITORAREA_FOCUS, true)
}, 0)
addHistorySnapshot() addHistorySnapshot()
} }