Commit 68d02135 by zhangxingmin

push

parent 2ba07d78
import App from './App.vue'; import App from './App.vue';
// #ifdef VUE3 // #ifdef VUE3
import { createApp } from 'vue' // 注意这里改成 createApp import { createApp } from 'vue'
// 创建应用实例 // 创建应用实例并挂载
const app = createApp(App) // 使用 createApp const vueApp = createApp(App) // 重命名变量避免冲突
vueApp.mount('#app')
// 挂载应用 // 如果需要导出,使用不同名称的函数
app.mount('#app') export function createSSRApp() {
return { app: vueApp }
// 导出 createApp 函数供 SSR 使用
export function createApp() {
return { app }
} }
// #endif // #endif
// #ifndef VUE3 // #ifndef VUE3
// Vue 2 兼容代码 // Vue 2 兼容代码
import Vue from 'vue' import Vue from 'vue'
import App from './App'
Vue.config.productionTip = false
App.mpType = 'app' App.mpType = 'app'
const app = new Vue({ const app = new Vue({
...App ...App
......
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