工作常用的工具函数和一些css效果的记录
# js中的防抖函数
function deBounce(fn, interval) {
let timer = null;
return function () {
if (timer) {
clearTimeout(timer);
}
timer = setTimeout(() =>{
fn.apply(this, arguments);
}, interval);
}
}