@@ -19,6 +19,7 @@ import DoubanCustomSelector from '@/components/DoubanCustomSelector';
1919import DoubanSelector from '@/components/DoubanSelector' ;
2020import PageLayout from '@/components/PageLayout' ;
2121import VideoCard from '@/components/VideoCard' ;
22+ import VirtualGrid from '@/components/VirtualGrid' ;
2223
2324function DoubanPageClient ( ) {
2425 const searchParams = useSearchParams ( ) ;
@@ -754,12 +755,18 @@ function DoubanPageClient() {
754755 { /* 内容展示区域 */ }
755756 < div className = 'max-w-[95%] mx-auto mt-8 overflow-visible' >
756757 { /* 内容网格 */ }
757- < div className = 'justify-start grid grid-cols-3 gap-x-2 gap-y-12 px-0 sm:px-2 sm:grid-cols-[repeat(auto-fill,minmax(160px,1fr))] sm:gap-x-8 sm:gap-y-20' >
758- { loading || ! selectorsReady
759- ? // 显示骨架屏
760- skeletonData . map ( ( index ) => < DoubanCardSkeleton key = { index } /> )
761- : // 显示实际数据
762- doubanData . map ( ( item , index ) => (
758+ { loading || ! selectorsReady
759+ ? // 显示骨架屏
760+ < div className = 'justify-start grid grid-cols-3 gap-x-2 gap-y-12 px-0 sm:px-2 sm:grid-cols-[repeat(auto-fill,minmax(160px,1fr))] sm:gap-x-8 sm:gap-y-20' >
761+ { skeletonData . map ( ( index ) => < DoubanCardSkeleton key = { index } /> ) }
762+ </ div >
763+ : // 显示实际数据
764+ < VirtualGrid
765+ items = { doubanData }
766+ className = 'grid-cols-3 gap-x-2 px-0 sm:px-2 sm:grid-cols-[repeat(auto-fill,minmax(160px,1fr))] sm:gap-x-8'
767+ rowGapClass = 'pb-12 sm:pb-20'
768+ estimateRowHeight = { 320 }
769+ renderItem = { ( item , index ) => (
763770 < div key = { `${ item . title } -${ index } ` } className = 'w-full' >
764771 < VideoCard
765772 from = 'douban'
@@ -774,8 +781,9 @@ function DoubanPageClient() {
774781 }
775782 />
776783 </ div >
777- ) ) }
778- </ div >
784+ ) }
785+ />
786+ }
779787
780788 { /* 加载更多指示器 */ }
781789 { hasMore && ! loading && (
0 commit comments