修复: 首页文库打开/新建空白后不切入编辑器
This commit is contained in:
@@ -254,6 +254,7 @@ onUnmounted(() => {
|
||||
@close="libraryVisible = false"
|
||||
@toast="toast"
|
||||
@switch-tab="(t: string) => switchTab(t as 'props' | 'ai')"
|
||||
@open-deck="mode = 'editor'"
|
||||
/>
|
||||
<TemplateModal
|
||||
:visible="templateVisible"
|
||||
|
||||
@@ -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')
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user