Przeglądaj źródła

feat:全局添加事件总线

yangqishu 4 miesięcy temu
rodzic
commit
2e15bef2f0
1 zmienionych plików z 3 dodań i 0 usunięć
  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')