fix(frontend): 防止切换文件丢稿并修复主题恢复

This commit is contained in:
2026-08-30 00:14:10 +08:00
parent a7772430d5
commit 0dbd32a757
7 changed files with 44 additions and 20 deletions
@@ -13,8 +13,9 @@ onMounted(() => {
// Already loaded
}
if (!workspaceStore.activeFilePath && workspaceStore.fileTree.length === 0) {
workspaceStore.openFile('/欢迎使用知笔知己.md')
editorStore.loadFile('/欢迎使用知笔知己.md')
void editorStore.loadFile('/欢迎使用知笔知己.md').then(() => {
workspaceStore.openFile('/欢迎使用知笔知己.md')
})
}
})
</script>