本身简单写的 事件订阅机制

我写的 简易的事件订触发。this export const Event = function () { // 类型 this.typeList = {} } Event.prototype.on = function ({type, fn}){ if (this.typeList.hasOwnProperty(type)) {
相关文章
相关标签/搜索