38 lines
773 B
JavaScript
38 lines
773 B
JavaScript
import App from './App'
|
||
import './framework/bootstrap'
|
||
import store from './store'
|
||
import Api from "./common/js/api.js"
|
||
// #ifndef VUE3
|
||
import Vue from 'vue'
|
||
import './uni.promisify.adaptor'
|
||
Vue.config.productionTip = false
|
||
// main.js,注意要在use方法之后执行
|
||
import uView from '@/uni_modules/uview-ui'
|
||
Vue.prototype.$store = store
|
||
Vue.prototype.api = Api;
|
||
// 让页面的 onLoad 在 onLaunch 之后执行
|
||
Vue.prototype.$onLaunched = new Promise(resolve => {
|
||
Vue.prototype.$isResolve = resolve
|
||
})
|
||
Vue.use(uView)
|
||
// 如此配置即可
|
||
App.mpType = 'app'
|
||
const app = new Vue({
|
||
store,
|
||
...App
|
||
})
|
||
app.$mount()
|
||
// #endif
|
||
|
||
|
||
// #ifdef VUE3
|
||
import {
|
||
createSSRApp
|
||
} from 'vue'
|
||
export function createApp() {
|
||
const app = createSSRApp(App)
|
||
return {
|
||
app
|
||
}
|
||
}
|
||
// #endif
|