Skip to content

cnvoid/broadcastMsg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

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

Watchers

Forks

Releases

No releases published

Packages

No packages published