摘要:
debounce(fn,delay=500) { let timer = null return function(){ if(timer){ clearTimeout(timer) } timer = setTimeout(fn,delay) } } 阅读全文
posted @ 2020-05-02 14:13
fm060
阅读(66)
评论(0)
推荐(0)
摘要:
代理模式主要有三种,保护代理,虚拟代理,缓存代理 1.保护代理 传入参数进行过滤处理 2.虚拟代理 在保护代理中,加入引入函数节流,防止频繁请求 3.缓存代理 可以为一些开销大的运算结果提供暂时的缓存,提升效率 阅读全文
posted @ 2020-05-02 10:11
fm060
阅读(205)
评论(0)
推荐(0)

浙公网安备 33010602011771号