From 0ecc402885f332b21923bb12183dc072306f2b39 Mon Sep 17 00:00:00 2001
From: cuiqian2004 <cuiqian2004@163.com>
Date: 星期五, 21 三月 2025 18:36:15 +0800
Subject: [PATCH] vue3

---
 main.js |   30 +++++++++++++++++++++++++-----
 1 files changed, 25 insertions(+), 5 deletions(-)

diff --git a/main.js b/main.js
index e10c420..963bcc9 100644
--- a/main.js
+++ b/main.js
@@ -1,18 +1,19 @@
-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)
@@ -22,5 +23,24 @@
 	...App,
 	i18n,
 })
+app.$mount()
+// #endif
 
-app.$mount()
\ No newline at end of file
+// #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