摘要: 步骤一:main.js new Vue({ beforeCreated(){ //全局事件总监 Vue.prototype.$bus = this } }) //监听地方回调 this.$bus.$on('监听的名字',(data) => { //这里是获取到监听数据 }) 页面卸载的时候使用$of 阅读全文
posted @ 2023-02-21 22:47 爱尚丽明 阅读(4) 评论(0) 推荐(0) 编辑