摘要: pub/sub 这个应该⼤家⽤到最⼴的设计模式了, class Event{ constructor(){ this.callbacks = {} } $off(name){ this.callbacks[name] = null } $emit(name, args){ let cbs = thi 阅读全文
posted @ 2020-07-28 12:00 又回到了起点 阅读(120) 评论(0) 推荐(0) 编辑