mirror of
https://github.com/MoonTechLab/LunaTV.git
synced 2026-05-21 21:57:28 +08:00
fix: load more on pc douban page
This commit is contained in:
@@ -36,7 +36,7 @@ function DoubanPageClient() {
|
|||||||
const tag = searchParams.get('tag');
|
const tag = searchParams.get('tag');
|
||||||
|
|
||||||
// 生成骨架屏数据
|
// 生成骨架屏数据
|
||||||
const skeletonData = Array.from({ length: 20 }, (_, index) => index);
|
const skeletonData = Array.from({ length: 25 }, (_, index) => index);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!type || !tag) {
|
if (!type || !tag) {
|
||||||
@@ -217,7 +217,13 @@ function DoubanPageClient() {
|
|||||||
{/* 加载更多指示器 */}
|
{/* 加载更多指示器 */}
|
||||||
{hasMore && !loading && (
|
{hasMore && !loading && (
|
||||||
<div
|
<div
|
||||||
ref={loadingRef}
|
ref={(el) => {
|
||||||
|
if (el && el.offsetParent !== null) {
|
||||||
|
(
|
||||||
|
loadingRef as React.MutableRefObject<HTMLDivElement | null>
|
||||||
|
).current = el;
|
||||||
|
}
|
||||||
|
}}
|
||||||
className='flex justify-center mt-12 py-8'
|
className='flex justify-center mt-12 py-8'
|
||||||
>
|
>
|
||||||
{isLoadingMore && (
|
{isLoadingMore && (
|
||||||
|
|||||||
Reference in New Issue
Block a user