JavaScript达成input持续输入,只发一次要求

原创
小哥 3年前 (2022-11-02) 阅读数 256 #js教程

handleSearch() {
if (this.keyword != ) {
// 实现input连续输入,只有一个请求
clearTimeout(this.timeout)
this.timeout = setTimeout(() => {
this.pageNum = 1;
this.finished = false;
this.total = 0;
this.orderList = [];
this.onLoadMore();
}, 1000)

}
}

版权声明

所有资源都来源于爬虫采集,如有侵权请联系我们,我们将立即删除

热门