摘要: 防抖:指触发事件后的n秒内函数只执行一次,若在n秒内再次触发则重新计算时间。 // 防抖 debounce // 延后执行 function debounce(func, wait) { let timer; return function() { if (timer) clearTimeout(t 阅读全文
posted @ 2021-11-23 16:53 远看山有色 阅读(34) 评论(0) 推荐(0)