摘要: ``` function Event() { this._events = {}; } Event.prototype.on = function(type, fn) { if (!this._events[type]) { this._events[type] = [] } this._events[type].push(fn); } Event.prototype.off = function 阅读全文
posted @ 2019-09-03 00:58 樱风凛 阅读(753) 评论(0) 推荐(0) 编辑