From a585b3bd462d53e03500e3d1f2ff040471ebc14e Mon Sep 17 00:00:00 2001 From: qiuchenfan <2035024011@qq.com> Date: Thu, 20 Nov 2025 10:54:57 +0800 Subject: [PATCH] 11201054 --- app/components/Carousel.tsx | 16 +++++++--------- app/components/news/body/ImageGridSection.tsx | 14 +++++++------- public/images/book2.png | Bin 58345 -> 144494 bytes 3 files changed, 14 insertions(+), 16 deletions(-) diff --git a/app/components/Carousel.tsx b/app/components/Carousel.tsx index da0724e..654a6c7 100755 --- a/app/components/Carousel.tsx +++ b/app/components/Carousel.tsx @@ -31,7 +31,7 @@ const imageUrls = [ export interface CarouselDemoProps { // 分页指示器位置:'left' 表示左下角,'right' 表示右下角,默认为 'right' paginationPosition?: 'left' | 'right'; - + // 分页指示器样式:'dot' 为圆形小点,'bar' 为横向小条,默认为 'dot' paginationStyle?: 'dot' | 'bar'; } @@ -73,7 +73,7 @@ export function CarouselDemo({ return ( // 外层容器:相对定位,占满父容器宽高
- + {/* 轮播主容器 */} {/* 动态生成指示器按钮 */} {Array.from({ length: count }).map((_, index) => ( @@ -136,12 +135,11 @@ export function CarouselDemo({ // 根据 paginationStyle 决定形状 paginationStyle === 'dot' ? 'h-2 w-2 rounded-full' // 圆形:宽高相等 + 全圆角 - : 'h-2 w-8 rounded' // 块状:宽 2rem,高 0.5rem,带圆角 - } ${ - index === current + : 'h-1 w-6 rounded' // 块状 + } ${index === current ? 'bg-white' // 当前项为纯白色 : 'bg-white/50' // 非当前项为半透明白色 - }`} + }`} aria-label={`Go to slide ${index + 1}`} // 无障碍支持 /> ))} diff --git a/app/components/news/body/ImageGridSection.tsx b/app/components/news/body/ImageGridSection.tsx index 04058be..3279d8f 100644 --- a/app/components/news/body/ImageGridSection.tsx +++ b/app/components/news/body/ImageGridSection.tsx @@ -45,7 +45,7 @@ const LearnPage = () => {
{/* 下三图 */} - {[3, 4, 5].map((i) => ( + {[3, 4, 6].map((i) => (
{ {/* 右侧新闻列表 */} -
+