methods:{
touchLLoding() {
window.onscroll = () => {
//给右边“精选沸点”盒子加固定窗口属性
let right = document.querySelector(".right-point");
if (document.documentElement.scrollTop > 490) {
right.style = "position:fixed;margin-left:730px";
} else {
right.style = "position:relative;";
}
//实现滚动条到底加载
if (
document.documentElement.scrollTop +
document.documentElement.clientHeight >=
document.documentElement.scrollHeight
) {
this.page++;
this.getBoilingData();
}
};
},
},
mounted(){
this.touchLLoding();
}
vue 触底加载
最新推荐文章于 2025-01-06 11:41:45 发布