vue-bus-manager
v1.1.1
Published
vue bus event manager
Downloads
7
Readme
Installation
import VueBus from 'vue-bus-manager'
Vue.use(VueBus)
Usage
// event listener
export default {
listener: {
'event name'(argv) {
this.listen(argv)
}
},
methods: {
listen(argv) {
....
}
}
}
// event trigger
this.$bus.$emit('event name', fn)
no need for destory vue event because of we have done for you in vue lifecycle 'beforeDestroy'