diff --git a/app/components/news/body/FireNews/ImportantNews.tsx b/app/components/news/body/FireNews/ImportantNews.tsx index 6403c63..b4a68a2 100644 --- a/app/components/news/body/FireNews/ImportantNews.tsx +++ b/app/components/news/body/FireNews/ImportantNews.tsx @@ -3,6 +3,33 @@ import {FireNewsList} from "./FireNewsList"; import { CarouselPreset } from "@/components/untils/CarouselPreset"; export function ImportantNews() { + // 定义所有轮播图片路径 + const carouselImages = [ + "/images/carousel-1.jpg", + "/images/carousel-2.jpg", + "/images/carousel-3.jpg", + "/images/carousel-4.jpg", + "/images/carousel-5.jpg", + "/images/carousel-6.jpg", + "/images/carousel-7.jpg", + "/images/carousel-8.jpg", + "/images/carousel-9.jpg", + ]; + + // 转换为 slides 格式 + const slides = carouselImages.map((imageUrl, index) => ({ + key: `carousel-${index + 1}`, + content: ( +
+ ), + })); + return(
{/* 轮播背景图 - 确保有明确尺寸 */} diff --git a/app/components/news/body/ImageGridSection.tsx b/app/components/news/body/ImageGridSection.tsx index 49f7a37..04058be 100644 --- a/app/components/news/body/ImageGridSection.tsx +++ b/app/components/news/body/ImageGridSection.tsx @@ -64,10 +64,10 @@ const LearnPage = () => { {newsList.map((item, index) => (
  • - {item} + {item}
  • ))} diff --git a/app/components/news/footer/footer.tsx b/app/components/news/footer/footer.tsx index 6282f6f..edc3d4a 100644 --- a/app/components/news/footer/footer.tsx +++ b/app/components/news/footer/footer.tsx @@ -8,39 +8,39 @@ const Footer: React.FC = () => { > {/* 主标题 */}
    -

    +

    春风拂面花开满园心OO情愉悦

    {/* 版权声明 */}
    -

    +

    免责声明:免责条款的提出必须是明示的,不允许以默示方式作出,也不允许法官推定免责条款的存在。

    -

    +

    版权所有:Copyright©2016-2019 包图网ibaotu.com 版权所有

    {/* 导航链接 */}
    - + 首页 - + 关于我们 - + 新闻中心 - + 政务公开 - + 交流互动 - + 便民服务
    diff --git a/app/components/untils/CarouselPreset.tsx b/app/components/untils/CarouselPreset.tsx index a9a7c6f..53da3dd 100644 --- a/app/components/untils/CarouselPreset.tsx +++ b/app/components/untils/CarouselPreset.tsx @@ -17,14 +17,14 @@ type Slide = { } type CarouselPresetProps = { - slides: Slide[] - autoplayDelay?: number - showControls?: boolean - showIndicators?: boolean - indicatorVariant?: "dot" | "pill" - className?: string - contentClassName?: string - itemClassName?: string + slides: Slide[] //传入的轮播项 + autoplayDelay?: number //自动轮播的间隔,默认为3000 + showControls?: boolean //是否显示左右切换按钮 + showIndicators?: boolean //是否显示底部的分页指示器 + indicatorVariant?: "dot" | "pill" //分页指示器的样式,默认为"dot",dot圆点,pill小胶囊 + className?: string // 作用在最外层容器,用来定制整体尺寸/布局 + contentClassName?: string //作用在内部的 CarouselContent 容器,可自定义内层排列方式(例如圆角、阴影等) + itemClassName?: string //作用在每个 CarouselItem 上,调整单个 slide 的额外样式(比如内边距、宽高) } export function CarouselPreset({