vue-option-events
Bring Vue.js 1 events option and $emit to Vue.js 2.
Install
npm install vue-option-events --save
Basic Usage
Install plugin
;; Vue;
events
option
Set Component A
methods: { console; } events: { console; } hi: 'show' ;
Component B
methods: { this; this; } ;
Use as global event bus
methods: { this$event; } ;
Emit events from any where
; eventBus;
Options
Vue;
keepAlive
enable if you want keep handling events on inactive keep-alive components, defaultfalse