cuiqian2004
2025-06-19 619b47962e41f506baf7ce2b535b2de1fecc719e
main.js
@@ -1,28 +1,45 @@
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
}
// #ifndef VUE3
import Vue from 'vue'
import './uni.promisify.adaptor'
import VueI18n from 'vue-i18n'
import './uni.promisify.adaptor'
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,
 i18n,
   ...App,
   i18n,
})
app.$mount()
// #endif
// #ifdef VUE3
import {
   createSSRApp
} from 'vue'
import {
   createI18n
} from 'vue-i18n'
const i18n = new createI18n(i18nConfig)
export function createApp() {
   const app = createSSRApp(App)
   app.use(i18n)
   return {
      app
   }
}
// #endif