v-eventhub
v1.0.2
Published
a class for 'emit' and 'on' event
Downloads
14
Maintainers
Readme
EventHub
install
npm install v-eventhub -S
import Eventhub
import Eventhub from 'v-eventhub'
or
const Eventhub = require('v-eventhub')
create a new EventHub instance
var eventHub = new EventHub
Apis
$emit
eventHub.$emit('say', 'what')
$on
eventHub.$on('say', msg => alert(msg))
$remove
eventHub.$remove('say')
$destroy
eventHub.$destroy('say')
有问题请加我微信,入群解决