封装代码 function tottle(fn,delay=500){ let timer= null; return function(){ if(timer){ return } timer = setTimeOut(()=>{ fn.call(this); timer = null; },delay) }}