在created函数中添加下面代码
window.onscroll = async () => {
const scrollTop = document.documentElement.scrollTop || document.body.scrollTop
const windowHeight = document.documentElement.clientHeight || document.boday.clientHeight
const scrollHeight = document.documentElement.scrollHeight || document.body.scrollHeight
if(scrollTop + windowHeight === scrollHeight) {
//如果滚轮到达了底部做出相应的处理
}
}