From e97cbb592d9165b808a76f654fa0a467817ddedf Mon Sep 17 00:00:00 2001
From: skyouc
Date: 星期六, 05 七月 2025 09:20:35 +0800
Subject: [PATCH] Merge branch 'devlop' of http://47.97.1.152:5880/r/pda-master into devlop
---
main.js | 17 ++++++++++++++++-
1 files changed, 16 insertions(+), 1 deletions(-)
diff --git a/main.js b/main.js
index e40b387..27d56ae 100644
--- a/main.js
+++ b/main.js
@@ -1,18 +1,29 @@
import App from './App'
+import messages from './locale/index'
+
+let i18nConfig = {
+ locale: uni.getLocale(),// 鑾峰彇宸茶缃殑璇█
+ messages
+}
// #ifndef VUE3
import Vue from 'vue'
+import VueI18n from 'vue-i18n'
+Vue.use(VueI18n)
+const i18n = new VueI18n(i18nConfig)
+
Vue.config.productionTip = false
import '@/common/bluetooth.js';
//鍏ㄥ眬鏁版嵁鐘舵�佺鐞� vuex
import store from '@/store/index.js';
Vue.prototype.$store = store;
-//鍏ㄥ眬鍏敤闈欐�佹暟鎹�
+//鍏ㄥ眬鍏敤闈欐�佹暟鎹甪
import Mock from '@/common/mock/index.js';
Vue.prototype.$Mock = Mock;
App.mpType = 'app'
+
try {
function isPromise(obj) {
@@ -43,6 +54,7 @@
} catch (error) { }
const app = new Vue({
+ i18n,
...App
})
app.$mount()
@@ -50,8 +62,11 @@
// #ifdef VUE3
import { createSSRApp } from 'vue'
+import { createI18n } from 'vue-i18n'
+const i18n = createI18n(i18nConfig)
export function createApp() {
const app = createSSRApp(App)
+ app.use(i18n)
return {
app
}
--
Gitblit v1.9.1