Merge pull request #61 from missile-xuan/master

fix: 修复添加元素后无法直接ctrl+z 撤销
This commit is contained in:
LLzzZZ 2021-07-25 13:17:31 +08:00 committed by GitHub
commit 1809f30ba8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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()
} }