We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No description provided.
The text was updated successfully, but these errors were encountered:
具体指的是哪一个组件?
Sorry, something went wrong.
因为没有固定的结构,这种页面拉到底部继续加载的交互现在一般没有用组件,就是在onscroll事件中判断滚动条高度和页面高度,下面的代码可以参考下:
function onScroll() { if (base.hasMask() || !hasMore) { return; } var viewHeight = $(window).height();//浏览器可视区域高度 var scrollHeight = $(window).scrollTop();//已滚动高度 var docHeight = $(document).height();//页面文档高度 var loadingHeight = $("#loading").height(); if (lastDocHeight == docHeight) {//避免页面内容改变前多次触发滚动条事件导致重复加载内容 return false; } if (viewHeight + scrollHeight >= docHeight - loadingHeight / 2) { lastDocHeight = docHeight; // to do something } else if (viewHeight + scrollHeight >= docHeight - loadingHeight / 2 - 100) { var date = new Date(); var now = date.getTime(); if (window.lastSetScrollTime == undefined || now - window.lastSetScrollTime >= 200) { document.body.scrollTop = scrollHeight; window.lastSetScrollTime = now; } } } $(window).scroll(function (event) { onScroll(); });
No branches or pull requests
No description provided.
The text was updated successfully, but these errors were encountered: