fix: modelscope api incorrect

This commit is contained in:
jialin
2025-11-21 13:43:39 +08:00
parent 19babbc73d
commit 3f63831488
5 changed files with 34 additions and 42 deletions
-25
View File
@@ -206,31 +206,6 @@ const Catalog: React.FC = () => {
}
}, [dataSource.loadend]);
useEffect(() => {
const handleScroll = async () => {
// Determine the scrolling element
const scrollingElement = document.documentElement || document.body;
// Calculate if the user has scrolled to the bottom
const isAtBottom =
scrollingElement.scrollTop + scrollingElement.clientHeight >=
scrollingElement.scrollHeight - 20; // Adding a small buffer for precision
if (isAtBottom) {
fetchData({
...queryParams,
page: queryParams.page + 1
});
}
};
window.addEventListener('scroll', handleScroll);
return () => {
window.removeEventListener('scroll', handleScroll);
};
}, [fetchData]);
return (
<PageBox>
<FilterBar