diff --git a/app/components/news/body/GrassrootsDynamics.tsx b/app/components/news/body/GrassrootsDynamics.tsx index 3c69570..79c5d45 100644 --- a/app/components/news/body/GrassrootsDynamics.tsx +++ b/app/components/news/body/GrassrootsDynamics.tsx @@ -1,21 +1,24 @@ import React from 'react'; -import List from '@/components/list/List'; +import List from '@/components/news/list/List'; + + export default function GrassrootsDynamics() { return ( -
+
-
+
基层动态
{/* 右边列表 */} -
+
diff --git a/app/components/list/List.tsx b/app/components/news/list/List.tsx similarity index 89% rename from app/components/list/List.tsx rename to app/components/news/list/List.tsx index ae0b0ff..b830a2f 100644 --- a/app/components/list/List.tsx +++ b/app/components/news/list/List.tsx @@ -19,11 +19,11 @@ const NewsItem: React.FC = ({ title = '', time = '', url = '' }) => { {/* 标题部分:左侧 */}
-

{title}

+

{title}

{/* 时间部分:右侧 */} -

{time}

+

{time}

); diff --git a/app/components/list/NewsData.tsx b/app/components/news/list/NewsData.tsx similarity index 100% rename from app/components/list/NewsData.tsx rename to app/components/news/list/NewsData.tsx diff --git a/app/components/list/NewsList.tsx b/app/components/news/list/NewsList.tsx similarity index 96% rename from app/components/list/NewsList.tsx rename to app/components/news/list/NewsList.tsx index dd9a476..12a9606 100644 --- a/app/components/list/NewsList.tsx +++ b/app/components/news/list/NewsList.tsx @@ -28,7 +28,7 @@ const NewsList: React.FC = () => { const educationNews = mockNewsData.filter((news) => news.type === "教育"); return ( -
+
{/* 使用 Flexbox 将两个列表放在一行 */}
{/* 科技新闻 */} diff --git a/app/routes/news.tsx b/app/routes/news.tsx index 6daf3fb..58fc702 100755 --- a/app/routes/news.tsx +++ b/app/routes/news.tsx @@ -4,7 +4,7 @@ import Integrated from "@/components/news/body/Integrated"; import CultureBgPage from "@/components/news/body/Culturebg"; import {Header} from "@/components/news/header/Header"; import {TopNav} from "@/components/news/header/TopNav"; -import NewsList from "@/components/list/NewsList"; +import NewsList from "@/components/news/list/NewsList"; import ImageGridSection from "@/components/news/body/ImageGridSection"; import GrassrootsDynamics from "@/components/news/body/GrassrootsDynamics"; import { FhywPage } from "@/components/news/body/FireNews/fhyw";