解决中英文问题

This commit is contained in:
owenchen committed 2026-09-02 14:45:23 +08:00
1 parent 8a13dfb836
commit 42435acf7e
8 files changed
+75 -32

No files matched your search

+3 -4
View File
@@ -5,7 +5,7 @@ import App from "./App.vue";
import { setupStore } from "./store";
//使用了Top await
import { setupRouter } from "./router";
import { mergeDbLocaleMessages } from "./locales";
import { setupI18n } from "./locales";
import {
setupAntd,
@@ -33,11 +33,10 @@ function setupPlugins() {
async function setupApp() {
// 挂载pinia状态管理
setupStore(app);
// 并行加载数据库 locale 表内容作为中英文翻译补充
const dbLocale = mergeDbLocaleMessages();
// 挂载路由
await setupRouter(app);
await dbLocale;
// 初始化 i18n(内部会异步拉取数据库翻译补充,不阻塞挂载)
await setupI18n(app);
app.mount("#app");
}