From ade379c26e00929b7295b37d7c274ccbb0026b7d Mon Sep 17 00:00:00 2001 From: cuiqian2004 <cuiqian2004@163.com> Date: 星期四, 12 六月 2025 12:27:26 +0800 Subject: [PATCH] test --- main.js | 35 ++++++++++++++++++++++++++--------- 1 files changed, 26 insertions(+), 9 deletions(-) diff --git a/main.js b/main.js index e26bfa7..90c45f7 100644 --- a/main.js +++ b/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 \ No newline at end of file -- Gitblit v1.9.1