From 3875cafaa2dc9e4b8dbfe1e9ca23c284ee26705e Mon Sep 17 00:00:00 2001
From: skyouc
Date: 星期六, 05 七月 2025 09:20:02 +0800
Subject: [PATCH] no message
---
main.js | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/main.js b/main.js
index 1f4d062..27d56ae 100644
--- a/main.js
+++ b/main.js
@@ -1,7 +1,17 @@
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';
@@ -13,6 +23,7 @@
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