注册$bus main.js vue.prototype.$bus = new Vue() 发射事件 this.$bus.$emit('eventName') 监听事件 this.$bus.$on('eventName', ()=>{ // ... })