eventbus-vue
v1.0.1
Published
A plugin of eventbus fro Vue.js
Downloads
4
Readme
install
npm install eventbus-vue
usage
import EventBus from 'eventbus-vue'; Vue.use(EventBus);
/**
- @param {string | Array} eventName
- @param {Function} callback
- @param {Vue instance} vm */ this.$eventbus.$on(eventName, callback, vm);
/**
- @param {string} eventName
- @param {...any} args */ this.$eventbus.$emit(eventName, args);
/**
- @param {string, Array} eventName
- @param {Function} callback
- @param {Vue Component} vm */ this.$eventbus.$once(eventName, callback, vm);