Parcourir la source

feat:全局添加事件总线

yangqishu il y a 4 mois
Parent
commit
2e15bef2f0
1 fichiers modifiés avec 3 ajouts et 0 suppressions
  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')