his more mount callback fun all tdi ear
componentDidMount(){ let timeoutId function callback(){ } window.addEventListener(‘scroll‘,function(){ if(this.props.isLoadingMore){ return } if(timeoutId){ clearTimeout(timeoutId) } timeoutId = setTimeout(callback,50) }.bind(this),false) }
js中的截流
来源: http://www.bubuko.com/infodetail-2065342.html