Bring Vue.js 1 events option and $emit to Vue.js 2.
npm install vue-option-events --save importVuefrom'vue';importvueOptionEventsfrom'vue-option-events';Vue.use(vueOptionEvents);Component A
newVue({methods: {show(hiMessage){console.log(hiMessage);}},events: {hello(helloMessage){console.log(helloMessage);},hi: 'show'}});Component B
newVue({methods: {send(){this.$emit('hello','world');this.$emit('hi','world');}}});newVue({methods: {send(){this.$event.$emit('hello','world');}}});importeventBusfrom'vue-option-events';eventBus.$emit('hello','world');Vue.use(vueOptionEvents,{keepAlive: false});keepAliveenable if you want keep handling events on inactive keep-alive components, defaultfalse