Skip to content

Latest commit

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

enentBus

实现vue中的eventBus on,off,once,emit

用法:

A页面

import EventBus from '****'
export default new EventBus()

b页面:

import EventBus from 'A'
EventBus.emit('test',9)

c页面

import EventBus from 'A'
EventBus.on('test',e => {
console.log(e)
})

About

实现vue中的eventBus

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors