//注冊一個空的實例,作為中轉站。
// 注冊一個空的 Vue 實例,作為 ‘中轉站’
var eventBus = new Vue({});
//$.emit觸發事件傳值 $.on監聽事件接受值
//eventBus就是中轉站 $emit 和 $on 的第一個參數相對應的 就能進行通信。
eventBus.$emit('refreshView', this.xmlObj);
//注冊一個空的實例,作為中轉站。
// 注冊一個空的 Vue 實例,作為 ‘中轉站’
var eventBus = new Vue({});
//$.emit觸發事件傳值 $.on監聽事件接受值
//eventBus就是中轉站 $emit 和 $on 的第一個參數相對應的 就能進行通信。
eventBus.$emit('refreshView', this.xmlObj);
本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。