修复: 首页文库打开/新建空白后不切入编辑器

This commit is contained in:
lxy
2026-08-17 09:36:52 +08:00
parent 352496c00a
commit e2b31579ea
2 changed files with 4 additions and 0 deletions
+3
View File
@@ -12,6 +12,7 @@ const emit = defineEmits<{
(e: 'close'): void
(e: 'toast', msg: string): void
(e: 'switch-tab', tab: string): void
(e: 'open-deck'): void
}>()
const libVersion = ref(0)
@@ -77,6 +78,7 @@ function onSave() {
function onNewBlank() {
store.newBlankDeck()
emit('switch-tab', 'props')
emit('open-deck')
toast('已新建空白演示,在右侧添加元素')
emit('close')
}
@@ -84,6 +86,7 @@ function onNewBlank() {
function onOpen(id: string) {
if (store.loadFromLibrary(id)) {
toast('已打开')
emit('open-deck')
emit('close')
}
}