初始化仓库
This commit is contained in:
40
main.js
Normal file
40
main.js
Normal file
@ -0,0 +1,40 @@
|
||||
import App from './App'
|
||||
|
||||
// #ifndef VUE3
|
||||
import Vue from 'vue'
|
||||
import store from './store'
|
||||
import {
|
||||
toast,
|
||||
copy
|
||||
} from './utils/tools'
|
||||
import Cache from './utils/cache'
|
||||
import minxinsApp from '@/mixins/app'
|
||||
import uView from "@/components/uview-ui";
|
||||
Vue.prototype.$toast = toast
|
||||
Vue.prototype.$copy = copy
|
||||
Vue.prototype.$Cache = Cache
|
||||
Vue.config.productionTip = false
|
||||
|
||||
|
||||
Vue.use(uView);
|
||||
App.mpType = 'app'
|
||||
Vue.mixin(minxinsApp);
|
||||
const app = new Vue({
|
||||
...App,
|
||||
store
|
||||
})
|
||||
app.$mount()
|
||||
|
||||
// #endif
|
||||
|
||||
// #ifdef VUE3
|
||||
import {
|
||||
createSSRApp
|
||||
} from 'vue'
|
||||
export function createApp() {
|
||||
const app = createSSRApp(App)
|
||||
return {
|
||||
app
|
||||
}
|
||||
}
|
||||
// #endif
|
||||
Reference in New Issue
Block a user