熵烬的头像 ID: 20783276500

熵烬

HelloWorld 社区成员

0385117636

文章1
个人网站0
加入社区2025

js实现发布订阅模式与观察者模式

发布订阅模式发布订阅模式直接没有关联,可以不发布只订阅也可以只订阅不发布例:<pre<codeconstevent{_arr:,on(fn){this._arr.push(fn)},emit(){