<div class="article_box" @scroll="showScroll">
//
showScroll (e) {
const windowH = e.target.clientHeight // 元素高度
const documentH= e.target.scrollHeight // 可滑动高度
const scrollH= e.target.scrollTop // 滑动高度,滑块到顶部的距离
if(windowH +scrollH >= documentH){
console.log('scroll')
}
}
注:这里若多滑几次到底部就会一直触发该事件,
解决方案可参考:https://blog.csdn.net/HockJerry/article/details/123714558