From 68f962b66c1b15b8cbcd06f6a3a721e185fb6075 Mon Sep 17 00:00:00 2001 From: qiuchenfan <2035024011@qq.com> Date: Thu, 20 Nov 2025 16:41:36 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=BC=E8=88=AA=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/components/news/header/TopNav.tsx | 43 ++++++++++++++------------- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/app/components/news/header/TopNav.tsx b/app/components/news/header/TopNav.tsx index 38d95fe..fd89bbb 100644 --- a/app/components/news/header/TopNav.tsx +++ b/app/components/news/header/TopNav.tsx @@ -59,29 +59,11 @@ export function TopNav({ return ( // 将组件宽度调整为1514px,并保持居中 -
+
{/* 搜索框与导航菜单组合 */} -
- {/* 搜索框 */} - -
- - - setSearchKeyword(e.target.value)} - className="pl-5 pr-4 py-2 text-sm h-full border border-gray-300 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent w-64 transition-all duration-200 hover:shadow-sm" /> -
- - +
{/* 导航菜单 */} -
    +
      {menuItems.map((item) => { const isActive = currentActiveKey === item.key; return ( @@ -101,6 +83,25 @@ export function TopNav({ ); })}
    + {/* 搜索框 */} + +
    + + + setSearchKeyword(e.target.value)} + className="pl-5 pr-4 py-2 text-sm h-full w-10 border border-gray-300 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent w-64 transition-all duration-200 hover:shadow-sm" /> +
    + + +