摘要: 防抖与节流 防抖 触发多次的事件都归并为一次事件在给定的时间内进行触发 document.onmousemove = _.debounce(()=> { console.log(1) }, 1000, true // 首次立即执行 ) 节流 在一次事件中,按给定的时间进行分段触发 document. 阅读全文
posted @ 2020-10-07 21:32 pluscat 阅读(138) 评论(0) 推荐(0) 编辑