mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-09 11:41:30 -07:00
hmm
This commit is contained in:
parent
082d9d8743
commit
818eb47663
1 changed files with 10 additions and 2 deletions
|
@ -71,11 +71,19 @@ defineExpose({
|
|||
scrollTop,
|
||||
});
|
||||
|
||||
const fetchedRecently = ref(false);
|
||||
|
||||
setInterval(() => {
|
||||
if (!tlEl.value) return;
|
||||
if (!tlEl.value || fetchedRecently.value) return;
|
||||
const viewport = document.documentElement.clientHeight;
|
||||
const left = document.documentElement.scrollHeight - document.documentElement.scrollTop;
|
||||
if (left <= viewport * 3) pagingComponent.value.fetchMore();
|
||||
if (left <= viewport * 3) {
|
||||
pagingComponent.value.fetchMore();
|
||||
fetchedRecently.value = true;
|
||||
setTimeout(() => {
|
||||
fetchedRecently.value = false;
|
||||
}, 500);
|
||||
}
|
||||
}, 100);
|
||||
</script>
|
||||
|
||||
|
|
Loading…
Reference in a new issue