main.js 465 字节
Newer Older
DCloud_JSON's avatar
DCloud_JSON 已提交
1
import App from './App'
雪洛's avatar
雪洛 已提交
2 3
import store from './store'
import i18n from './lang/i18n'
DCloud_JSON's avatar
DCloud_JSON 已提交
4 5


雪洛's avatar
雪洛 已提交
6
// #ifndef VUE3
DCloud_JSON's avatar
DCloud_JSON 已提交
7 8 9 10
import Vue from 'vue'
Vue.config.productionTip = false
Vue.prototype.$store = store
App.mpType = 'app'
雪洛's avatar
雪洛 已提交
11
const app = new Vue({
DCloud_JSON's avatar
DCloud_JSON 已提交
12 13 14 15 16 17
	i18n,
	store,
	...App
})
app.$mount()
// #endif
雪洛's avatar
雪洛 已提交
18

DCloud_JSON's avatar
DCloud_JSON 已提交
19 20 21 22 23

// #ifdef VUE3
import {createSSRApp} from 'vue'

export function createApp() {
雪洛's avatar
雪洛 已提交
24 25
	const app = createSSRApp(App)
	app.use(i18n)
DCloud_JSON's avatar
DCloud_JSON 已提交
26 27 28
	app.use(store)
	return {app}
}
雪洛's avatar
雪洛 已提交
29
// #endif