<div @scroll="scrollEvent($event)"></div>
//监听滚动条高度
scrollEvent(e) {
let scrollBottom =
e.target.scrollHeight -
e.target.scrollTop -
e.target.clientHeight;
this.scrollBottom = scrollBottom
console.log('距低部-', this.scrollBottom);
},
<div @scroll="scrollEvent($event)"></div>
//监听滚动条高度
scrollEvent(e) {
let scrollBottom =
e.target.scrollHeight -
e.target.scrollTop -
e.target.clientHeight;
this.scrollBottom = scrollBottom
console.log('距低部-', this.scrollBottom);
},