- 博客(2)
- 收藏
- 关注
原创 vue非父子组件之间的通信
//1.创建事件中心 var bus = new Vue({}) //组件1触发: bus.$emit(“get-detail”,_this.details); //组件2接收: bus.$on(‘get-detail’, (msg) => { })
2018-08-10 16:12:22 70
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
//1.创建事件中心 var bus = new Vue({}) //组件1触发: bus.$emit(“get-detail”,_this.details); //组件2接收: bus.$on(‘get-detail’, (msg) => { })
2018-08-10 16:12:22 70
TA创建的收藏夹 TA关注的收藏夹
TA关注的人