created() {
window.onscroll = () => {
var scrollTop =
document.documentElement.scrollTop || document.body.scrollTop;
var windowHeight =
document.documentElement.clientHeight || document.body.clientHeight;
var scrollHeight =
document.documentElement.scrollHeight || document.body.scrollHeight;
if (scrollHeight ==( scrollTop - windowHeight )) {
alert('已经滚动到底部了')
}
};
},
网友评论