初始化
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
import Vue from 'vue'
|
||||
import App from './App.vue'
|
||||
|
||||
export function createApp() {
|
||||
Vue.config.productionTip = false
|
||||
App.mpType = 'app'
|
||||
if (!Vue.prototype.$mp) Vue.prototype.$mp = {}
|
||||
if (!Vue.prototype.$mp.query) Vue.prototype.$mp.query = {}
|
||||
Vue.mixin({
|
||||
beforeCreate() {
|
||||
if (!this.$mp) this.$mp = {}
|
||||
if (!this.$mp.query) this.$mp.query = {}
|
||||
}
|
||||
})
|
||||
const app = new Vue({
|
||||
...App
|
||||
})
|
||||
return {
|
||||
app
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user