摘要: class Event { constructor() { this.eventObj = {}; } $on(eventName, fn) { if (!this.eventObj[eventName]) { this.eventObj[eventName] = []; } this.eventO 阅读全文
posted @ 2021-03-30 18:58 ~~Distance 阅读(112) 评论(0) 推荐(0)
摘要: bind bind用法fn.bind(thisobj,参数1,参数2,。。。) this.a = 1; var mode = { a: 10, getA: function (...rest) { return rest.reduce((pre, value) => { console.log(pr 阅读全文
posted @ 2021-03-30 18:39 ~~Distance 阅读(83) 评论(0) 推荐(0)