소스 검색

feat:全局添加事件总线

yangqishu 4 달 전
부모
커밋
2e15bef2f0
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      src/main.js

+ 3 - 0
src/main.js

@@ -38,5 +38,8 @@ setRootFontSize('v')
 new Vue({
   router,
   store,
+  beforeCreate() {
+    Vue.prototype.$globalEventBus = this
+  },
   render: (h) => h(App)
 }).$mount('#app')