import '.env.js' import App from './App' //引入语言包 import messages from './locale/index' let i18nConfig = { locale: uni.getLocale(), messages } //引入前置路由颜值 import { router, RouterMount } from './common/router/router.js' //路径换成自己的 Vue.use(router) // #ifndef VUE3 import Vue from 'vue' import store from './store' import Nav from './components/en-utils/en-nav/en-nav.vue' import VueI18n from 'vue-i18n' Vue.use(VueI18n) const i18n = new VueI18n(i18nConfig) Vue.component('Nav', Nav) Vue.config.productionTip = false App.mpType = 'app' const app = new Vue({ i18n, ...App, store }) // app.$mount() // #ifdef H5 RouterMount(app, router, '#app') // #endif // #ifndef H5 app.$mount(); //为了兼容小程序及app端必须这样写才有效果 // #endif // #endif // #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, } } // #endif