1. 样式
.scroll-box {
height: 100vh;
overflow-y: auto;
}
2. html 。 <div ref="homeUl" class="scroll-box" @scroll="scrollBox($event)">
3. js 、
scrollBox(){
let { scrollTop,clientHeight,scrollHeight} = this.$refs.homeUl;
if(scrollTop+clientHeight+3>scrollHeight){
//加载方法
console.log('请求后台数据');
}