初始化项目
This commit is contained in:
31
main.js
Normal file
31
main.js
Normal file
@@ -0,0 +1,31 @@
|
||||
import App from './App'
|
||||
|
||||
// #ifndef VUE3
|
||||
import Vue from 'vue';
|
||||
import { router, RouterMount } from './router';
|
||||
import store from './store';
|
||||
import uView from "uview-ui";
|
||||
Vue.use(uView);
|
||||
Vue.use(router)
|
||||
Vue.config.productionTip = false
|
||||
Vue.prototype.$store = store
|
||||
App.mpType = 'app'
|
||||
const app = new Vue({
|
||||
...App
|
||||
})
|
||||
app.$mount()
|
||||
// #endif
|
||||
// #ifdef H5
|
||||
RouterMount(app,router,'#app')
|
||||
// #endif
|
||||
// #ifdef VUE3
|
||||
import {
|
||||
createSSRApp
|
||||
} from 'vue'
|
||||
export function createApp() {
|
||||
const app = createSSRApp(App)
|
||||
return {
|
||||
app
|
||||
}
|
||||
}
|
||||
// #endif
|
||||
Reference in New Issue
Block a user