From 0108f10f2ffe52fadf2ae425aae9727a400dd973 Mon Sep 17 00:00:00 2001 From: jt <jt@activesoft.com.cn> Date: 星期六, 20 七月 2024 12:16:13 +0800 Subject: [PATCH] 从3201首页进入3200功能点报错问题改进 --- main.js | 18 +++++++++++++++--- 1 files changed, 15 insertions(+), 3 deletions(-) diff --git a/main.js b/main.js index c2d170b..e10c420 100644 --- a/main.js +++ b/main.js @@ -1,14 +1,26 @@ import Vue from 'vue' import App from './App' import store from "./store"; +// i18n +import messages from './locale' +import VueI18n from 'vue-i18n' +const i18nConfig = { + locale: uni.getLocale(), + messages +} + +Vue.use(VueI18n) Vue.config.productionTip = false Vue.prototype.$store = store App.mpType = 'app' +const i18n = new VueI18n(i18nConfig) const app = new Vue({ - store, - ...App, + store, + ...App, + i18n, }) -app.$mount() + +app.$mount() \ No newline at end of file -- Gitblit v1.9.1