vue-e-bus
v1.0.0
Published
Simple event bus
Downloads
5,151
Readme
Event bus for Vue
Use this plugin for emit events for anywhere components, e.g:
import EventBus from '@m/bus'
// in a component
mounted () {
EventBus.$emit('message', 'Hello')
}
// in another component
mounted () {
EventBus.$on('message', (message) => alert(`Say: ${message}`))
}
// output: Say: Hello