vue提供@scroll事件监听滚动事件,直接看代码
<div class="carspace_con" ref="Box" @scroll="divScroll"> </div>
divScroll(e){ let toTop = this.$refs.Box.scrollTop; console.log('距离顶部'+toTop); },