vue scroll事件
handleScroll(e) { const scrollTop = e.target.scrollTop const windowHeight = e.target.clientHeight const scrollHeight = e.target.scrollHeight if (scrollTop + windowHeight >= scrollHeight) { console.log('到达底部了') } if (scrollTop === 0 && this.oldv !== 0) { console.log('到达头部了') } },

浙公网安备 33010602011771号