mounted(){ document.body.scrollTop = 0; this.a=document.body.scrollHeight||document.documentElement.scrollHeight; this.c = document.documentElement.clientHeight; window.addEventListener('scroll',this.menu); }, menu() { this.a = document.body.scrollHeight || document.documentElement.scrollHeight; this.b = document.body.scrollTop || document.documentElement.scrollTop; //通过判断滚动条的top位置与可视网页之和与整个网页的高度是否相等来决定是否加载内容; if (this.b + this.c == this.a) { // this.$router.push('./intelligenceb'); setTimeout(()=> { console.log(滚动到底了) },800); // return; } }
1 回答
慕的地6264312
TA贡献1817条经验 获得超6个赞
添加回答
举报
0/150
提交
取消