先导出 new Vue 实例
在 request 中 引入实例,通过实例调用
// 在当前模块中引入 store
import {vm} from '@/main'
// 在main中导出
export const vm = new Vue({
render: h => h(App),
// 全局事件总线
beforeCreate(){
Vue.prototype.$bus = this
},
router,
store
}).$mount('#app')