没有合适的资源?快使用搜索试试~ 我知道了~
publisher:微型图书馆订阅并发出自定义事件
共7个文件
js:3个
yml:1个
gitignore:1个
需积分: 5 0 下载量 112 浏览量
2021-05-15
10:41:05
上传
评论
收藏 4KB ZIP 举报
温馨提示
发行人 微型图书馆订阅并发出自定义事件 例子 基本例子 // add subscriber to listen event with name EVENT_1 const firstSubscriber = publisher . subscribe ( 'EVENT_1' , ( data ) => { console . log ( 'recive data from EVENT_1 --> ' , data ) } ) ; // emit event to all subscriber to EVENT_1 publisher . emit ( 'EVENT_1' , 'hello subscriber' ) ; // Deregister event firstSubscriber ( ) ;
资源推荐
资源详情
资源评论
收起资源包目录
publisher-master.zip (7个子文件)
publisher-master
.gitignore 132B
package.json 562B
gulpfile.js 267B
dist
bundle.min.js 1004B
travis.yml 212B
index.js 3KB
README.md 423B
共 7 条
- 1
资源评论
传奇panda
- 粉丝: 23
- 资源: 4581
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功