type OnEmit = {
arr: Function[];
on: (fn: Function) => void;
emit: Function
};
const event: OnEmit = {
arr: [],
on(fn: Function) {
this.arr.push(fn);
},
emit() {
this.arr.forEach(fn => fn());
}
};
on-emit
最新推荐文章于 2021-11-23 17:37:40 发布
780

被折叠的 条评论
为什么被折叠?



