From 3adc1355b61267b02d43f31646ed00873730fceb Mon Sep 17 00:00:00 2001 From: imeepos Date: Fri, 25 Jul 2025 15:40:41 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=B0=86=E9=A1=B6=E9=83=A8=E5=AF=BC?= =?UTF-8?q?=E8=88=AA=E7=A9=BF=E6=90=AD=E9=A1=B5=E9=9D=A2=E6=9B=BF=E6=8D=A2?= =?UTF-8?q?=E4=B8=BAAI=E7=A9=BF=E6=90=AD=E6=96=B9=E6=A1=88=E6=8E=A8?= =?UTF-8?q?=E8=8D=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 路由从 /fashion-chat 改为 /outfit - 指向 OutfitRecommendationTool 页面 - 修复导航激活冲突问题 - 更新描述为AI穿搭方案推荐与素材检索 --- apps/desktop/src/App.tsx | 1 + apps/desktop/src/components/Navigation.tsx | 11 +++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/apps/desktop/src/App.tsx b/apps/desktop/src/App.tsx index 72b88af..5ad5a9e 100644 --- a/apps/desktop/src/App.tsx +++ b/apps/desktop/src/App.tsx @@ -115,6 +115,7 @@ function App() { } /> } /> } /> + } /> } /> } /> diff --git a/apps/desktop/src/components/Navigation.tsx b/apps/desktop/src/components/Navigation.tsx index 57cc36f..cc2347d 100644 --- a/apps/desktop/src/components/Navigation.tsx +++ b/apps/desktop/src/components/Navigation.tsx @@ -46,9 +46,9 @@ const Navigation: React.FC = () => { }, { name: '穿搭', - href: '/fashion-chat', + href: '/outfit', icon: SparklesIcon, - description: 'AI智能服装搭配推荐' + description: 'AI穿搭方案推荐与素材检索' }, { name: '工具', @@ -62,6 +62,13 @@ const Navigation: React.FC = () => { if (href === '/') { return location.pathname === '/'; } + + // 特殊处理:工具页面只匹配 /tools 本身,不匹配子路径 + if (href === '/tools') { + return location.pathname === '/tools'; + } + + // 其他路径使用 startsWith 匹配 return location.pathname.startsWith(href); };