摘要: // 发布订阅Pub/Sub class EventBus { constructor() { // 1.处理事件对应的处理函数 this.sub = {} } $on(event,fn) { if(!this.sub[event]) { this.sub[event] = [] } this.su 阅读全文
posted @ 2022-03-02 10:53 我是前端QQ942031558 阅读(88) 评论(0) 推荐(0) 编辑