Visitar URL original
GitHub - cnvoid/broadcastMsg: 在javascipt实现观察者模式 · GitHub
Skip to content

About

在javascipt实现观察者模式

Resources

Stars

4 stars

Watchers

1 watching

Forks

Latest commit

 

History

14 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

broadcastMsg

Implement the Observer Pattern in javascript

How to use:

var msg = require('broadcastMsg');
import msg from '@/lib/msg'
//using in vue

Vue.prototype.$msg = msg


//Receive a broadcast message
msg.receive('MSG_MARK',function(data){

});

//Emitter a broadcast message

msg.emit('MSG_MARK', data);

#Contact me: 734271284@qq.com

cnvoid@126.com

About

在javascipt实现观察者模式

Resources

Stars

4 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages