load(e){
let selectWrap = document.querySelector(`#multipleTable .el-table__body-wrapper`)
let {scrollHeight, scrollTop, clientHeight} = selectWrap
if(scrollHeight == scrollTop + clientHeight){
if(this.pageParams.total > this.tableListData.length){
this.pageParams.pageNo = this.pageParams.pageNo? Number(this.pageParams.pageNo) + 1: 1
this.getData()
}
}
},
getData(){
xxx.then(res => {
if (res.data.current == 1) {
this.tableListData = data;
} else {
this.tableListData = this.tableListData.concat(data);
}
})
}
mounted() {
this.nextTick(() => {
if(document.querySelector(`#multipleTable .el-table__body-wrapper`)){
let selectWrapAll = document.querySelectorAll(`#multipleTable .el-table__body-wrapper`)
let selectWrap = selectWrapAll[selectWrapAll.length -1]
selectWrap.addEventListener('scroll', this.load)
}
});