$emit用于发送数据 $on用于接收数据
<<创建bus最佳方式>>
new Vue({
........
beforeCreate() {
this.prototype.$bus=this
},
........
})
$emit用于发送数据 $on用于接收数据
<<创建bus最佳方式>>
new Vue({
........
beforeCreate() {
this.prototype.$bus=this
},
........
})