chore: 同步HBuilderX生成的main.js(Vue2/Vue3兼容)

This commit is contained in:
2026-08-07 13:09:19 +08:00
parent 0de981ea81
commit 0e5b2e42e9

View File

@ -1,7 +1,24 @@
import { createSSRApp } from "vue"; import App from './App'
import App from "./App.vue";
// #ifndef VUE3
import Vue from 'vue'
import './uni.promisify.adaptor'
Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
...App
})
app.$mount()
// #endif
// #ifdef VUE3
import {
createSSRApp
} from 'vue'
export function createApp() { export function createApp() {
const app = createSSRApp(App); const app = createSSRApp(App)
return { app }; return {
app
}
} }
// #endif