上滑加载下一页数据
首先了解ScrollTop、ScrollHeight、ClientHeight、OffsetHeight属性是如何定义的。
https://blog.csdn.net/caseywei/article/details/92644503
try {
let dom = e.target ? e.target : e// 滚动区域的dom
let bottom = dom.scrollHeight - dom.scrollTop - dom.clientHeight
if (bottom <= 0 ) {
Toast.loading('加载中', 0)
// 在此处处理下一页要加载的数据
}
} catch (error) {
console.log(error)
}
}