摘要: 1.节流和防抖 节流:高频触发事件,在n秒内只执行一次 1 function throttle (fn, delay) { 2 let canRun = ture 3 return function () { 4 if (!canRun) return 5 canRun = false 6 setT 阅读全文
posted @ 2021-08-03 18:37 dropInInt 阅读(43) 评论(0) 推荐(0) 编辑