fix: i18n

This commit is contained in:
xiaoxian521 2022-03-14 12:35:25 +08:00
parent 0bba4b7d64
commit bef0d9234e
2 changed files with 3 additions and 3 deletions

View File

@ -3,7 +3,7 @@ import router from "./router";
import { setupStore } from "/@/store";
import { getServerConfig } from "./config";
import { createApp, Directive } from "vue";
import { usI18n } from "../src/plugins/i18n";
import { useI18n } from "../src/plugins/i18n";
import { MotionPlugin } from "@vueuse/motion";
import { useTable } from "../src/plugins/vxe-table";
import { useElementPlus } from "../src/plugins/element-plus";
@ -43,6 +43,6 @@ getServerConfig(app).then(async config => {
await router.isReady();
injectResponsiveStorage(app, config);
setupStore(app);
app.use(MotionPlugin).use(useElementPlus).use(useTable).use(usI18n);
app.use(MotionPlugin).use(useI18n).use(useElementPlus).use(useTable);
app.mount("#app");
});

View File

@ -67,6 +67,6 @@ export const i18n: I18n = createI18n({
messages: localesConfigs
});
export function usI18n(app: App) {
export function useI18n(app: App) {
app.use(i18n);
}