refactor: ♻️ 统一注册vue插件

This commit is contained in:
cshaptx4869
2024-05-30 14:16:39 +08:00
parent c0ceb06f1e
commit af54fb26b6
5 changed files with 39 additions and 25 deletions

View File

@@ -1,3 +1,4 @@
import type { App } from "vue";
import { createI18n } from "vue-i18n";
import { useAppStoreHook } from "@/store/modules/app";
// 本地语言包
@@ -22,4 +23,9 @@ const i18n = createI18n({
globalInjection: true,
});
// 全局注册 i18n
export function setupI18n(app: App<Element>) {
app.use(i18n);
}
export default i18n;