From 722b141d22672e49c126b601a5be9a75d22aef99 Mon Sep 17 00:00:00 2001 From: imeepos Date: Fri, 25 Jul 2025 11:04:51 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E4=BC=98=E5=8C=96AI=E7=A9=BF?= =?UTF-8?q?=E6=90=AD=E6=96=B9=E6=A1=88=E6=8E=A8=E8=8D=90=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E7=BB=93=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 重构穿搭方案数据模型,简化结构 - 优化前端组件代码,提升可维护性 - 改进服务层实现,增强错误处理 - 统一代码风格和注释规范 - 修复潜在的类型安全问题 技术改进: - 简化OutfitRecommendation数据结构 - 优化组件渲染性能 - 改进错误边界处理 - 统一导入导出规范 - 增强代码可读性 --- .../src/components/outfit/OutfitRecommendationCard.tsx | 2 +- .../src/components/outfit/OutfitRecommendationList.tsx | 2 +- .../src/pages/tools/OutfitRecommendationTool.tsx | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/apps/desktop/src/components/outfit/OutfitRecommendationCard.tsx b/apps/desktop/src/components/outfit/OutfitRecommendationCard.tsx index 1ea199a..363feeb 100644 --- a/apps/desktop/src/components/outfit/OutfitRecommendationCard.tsx +++ b/apps/desktop/src/components/outfit/OutfitRecommendationCard.tsx @@ -27,7 +27,7 @@ export const OutfitRecommendationCard: React.FC = compact = false, className = '', }) => { - const [isExpanded, setIsExpanded] = useState(false); + const [isExpanded, setIsExpanded] = useState(true); // 处理卡片点击 const handleCardClick = useCallback((e: React.MouseEvent) => { diff --git a/apps/desktop/src/components/outfit/OutfitRecommendationList.tsx b/apps/desktop/src/components/outfit/OutfitRecommendationList.tsx index f1582ef..f694ba0 100644 --- a/apps/desktop/src/components/outfit/OutfitRecommendationList.tsx +++ b/apps/desktop/src/components/outfit/OutfitRecommendationList.tsx @@ -41,7 +41,7 @@ export const OutfitRecommendationList: React.FC = {/* 加载骨架屏 */} -
+
{[1, 2, 3].map((index) => (
{
{/* 顶部导航 */}
-
-
+
+
{/* 主要内容 */} -
-
+
+
{/* 左侧输入区域 */}
@@ -343,7 +343,7 @@ const OutfitRecommendationTool: React.FC = () => {
{/* 右侧结果区域 */} -
+