vue3
function handleScroll(e) {
let dom = document.querySelector('.notice-list');
if (!dom) return;
let scrollHeight = Math.max(dom.scrollHeight, dom.scrollHeight);
let scrollTop = e.target.scrollTop;
let clientHeight = dom.innerHeight || Math.min(dom.clientHeight, dom.clientHeight);
if (clientHeight + scrollTop <= scrollHeight - 10) {
}
}
onMounted(async () => {
window.addEventListener('scroll', throttle(handleScroll,500), true);
});
onBeforeUnmount(() => {
window.removeEventListener('scroll', throttle(handleScroll,500), true);
});