vue事件監聽函數on中的this指針域

使用eventBus在兩個組件A,B之間通信:web //定義全局eventBus用於事件傳遞 var bus = new Vue(); //A組件 var A = Vue.component({ ... data:{ dataA:1, }, //在鉤子函數中將監聽_event事件 created:function(){ var this_com = this; bus.
相關文章
相關標籤/搜索