feat: 将顶部导航穿搭页面替换为AI穿搭方案推荐

- 路由从 /fashion-chat 改为 /outfit
- 指向 OutfitRecommendationTool 页面
- 修复导航激活冲突问题
- 更新描述为AI穿搭方案推荐与素材检索
This commit is contained in:
imeepos 2025-07-25 15:40:41 +08:00
parent 5d198c9909
commit 3adc1355b6
2 changed files with 10 additions and 2 deletions

View File

@ -115,6 +115,7 @@ function App() {
<Route path="/templates" element={<TemplateManagement />} />
<Route path="/material-model-binding" element={<MaterialModelBinding />} />
<Route path="/fashion-chat" element={<ChatTool />} />
<Route path="/outfit" element={<OutfitRecommendationTool />} />
<Route path="/tools" element={<Tools />} />
<Route path="/tools/data-cleaning" element={<DataCleaningTool />} />

View File

@ -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);
};