//防抖
Debounce (fn, t) { let delay = t || 500; let timer; return function () { let args = arguments; if(timer){ clearTimeout(timer); } timer = setTimeout(() => { timer = null; fn.apply(this, args); }, delay); } },
loadMore(){ this.form.pageNum++; console.log(this.form.pageNum,'this.form.pageNum'); let syys = { pageSize: this.form.pageNum, pageNum: this.form.pageNum } // 列表 this.$apiconfig.checkFlowable(syys).then(res => { if (res.code === 200) { this.formList = [...this.formList, ...res.rows] console.log(this.formList, '222'); } }) } 滚到底部时加载 onReachBottom(){ this.Debounce(this.loadMore(),1000) }