1.main.js
Vue.prototype.$onLaunched = new Promise(resolve => {
Vue.prototype.$isResolve = resolve;
})
2.app.vue的onLaunch
this.$isResolve()
3.首页onLoad
async onLoad(options) {
await this.$onLaunched;
},
1.main.js
Vue.prototype.$onLaunched = new Promise(resolve => {
Vue.prototype.$isResolve = resolve;
})
2.app.vue的onLaunch
this.$isResolve()
3.首页onLoad
async onLoad(options) {
await this.$onLaunched;
},