Эх сурвалжийг харах

create global event bus/hub

Michael Wang 5 жил өмнө
parent
commit
1f0cfa548b
1 өөрчлөгдсөн 2 нэмэгдсэн , 0 устгасан
  1. 2 0
      src/main.js

+ 2 - 0
src/main.js

@@ -24,6 +24,8 @@ if (
 
 
 Vue.component("ecs-form-search", EcsFormSearch);
 Vue.component("ecs-form-search", EcsFormSearch);
 
 
+Vue.prototype.$eventHub = new Vue();
+
 new Vue({
 new Vue({
   router,
   router,
   store,
   store,