mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-21 17:37:29 -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,
|
scrollTop,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const fetchedRecently = ref(false);
|
||||||
|
|
||||||
setInterval(() => {
|
setInterval(() => {
|
||||||
if (!tlEl.value) return;
|
if (!tlEl.value || fetchedRecently.value) return;
|
||||||
const viewport = document.documentElement.clientHeight;
|
const viewport = document.documentElement.clientHeight;
|
||||||
const left = document.documentElement.scrollHeight - document.documentElement.scrollTop;
|
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);
|
}, 100);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue