Explorar el Código

feat:全局添加事件总线

yangqishu hace 4 meses
padre
commit
2e15bef2f0
Se han modificado 1 ficheros con 3 adiciones y 0 borrados
  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')