摘要: class EventEmitter { constructor() { this.emitter = {} } on(eventName,cb) { if (this.emitter[eventName]) { this.emitter[eventName].push(cb) } else { this.emitter[eventName] = [] thi... 阅读全文
posted @ 2018-05-14 23:11 小小丶码农 阅读(763) 评论(0) 推荐(0) 编辑