LittlebearHat

Results 1 comments of LittlebearHat

``` let obj = {}; //保存的内容 function on(id, f) { if (!obj[id]) { obj[id] = []; } obj[id].push(f); //注册事件 } function emit(id, msg) { if (!obj[id]) return; obj[id].forEach((f) => f(msg));...