Commit 2533c9f7 by zhangxingmin

push

parent 68d02135
// main.js
import App from './App.vue';
// #ifdef VUE3
import { createApp } from 'vue'
// 创建应用实例并挂载
const vueApp = createApp(App) // 重命名变量避免冲突
vueApp.mount('#app')
// 如果需要导出,使用不同名称的函数
export function createSSRApp() {
return { app: vueApp }
}
const app = createApp(App)
app.mount('#app')
// #endif
// #ifndef VUE3
// Vue 2 兼容代码
import Vue from 'vue'
// Vue 2 兼容代码 - 使用命名导入
import * as Vue from 'vue'
App.mpType = 'app'
const app = new Vue({
const app = new Vue.default({
...App
})
app.$mount()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment