本身簡單寫的 事件訂閱機制

我寫的 簡易的事件訂觸發。this export const Event = function () { // 類型 this.typeList = {} } Event.prototype.on = function ({type, fn}){ if (this.typeList.hasOwnProperty(type)) {
相關文章
相關標籤/搜索