摘要: 1、在main.js中设置全局事件总线 Vue.prototype.$EventBus = new Vue() 2、在A绑定事件 mounted() { this.$EventBus.$on("pass", (param) => { //执行响应操作 }); }, 3、在B触发事件 that.$Ev 阅读全文
posted @ 2021-04-20 18:12 (⊙o⊙)买噶 阅读(68) 评论(0) 推荐(0) 编辑