Skip to content

packaaa/enentBus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

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

Watchers

Forks

Releases

No releases published

Packages

No packages published