vue組件間事件派發與接收

在vue的開發中,經常會在兩個組件間進行事件的通信 在vue1.0中我們使用$dispatch 和 $broadcast child.vue: this.$dispatch('eventName',this.data); parent.vue: event:{ 'eventName':function(data) { // 執行的方法 } } 但是在vue2.0中$dispatch 和 $b
相關文章
相關標籤/搜索