From da0458370351f4a6dea35a8b989a6614927eb9b1 Mon Sep 17 00:00:00 2001 From: ittoview Date: Sun, 1 Mar 2026 14:37:01 +0000 Subject: [PATCH] =?UTF-8?q?fix(=E7=BB=83=E4=B9=A0):=20=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E7=A7=BB=E5=8A=A8=E7=AB=AF=E5=B8=83=E5=B1=80=E5=92=8C=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 调整底部固定区域布局,输入框和辅助信息分层显示 - 压缩矩阵格子间距和内边距,适配小屏幕 - 辅助信息区域限高并可滚动,只显示前2个裁剪因素 - 减小字体大小和组件尺寸,提升移动端体验 - 修复表头吸顶位置偏移 via [HAPI](https://hapi.run) Co-Authored-By: HAPI --- src/components/practice/HintInfo.tsx | 68 +++++++------------ src/components/practice/KnowledgeAreaCell.tsx | 10 +-- src/components/practice/PracticeMatrix.tsx | 16 ++--- src/components/practice/ProcessCell.tsx | 12 ++-- src/pages/ProcessPracticePage.tsx | 66 ++++++++++-------- 5 files changed, 80 insertions(+), 92 deletions(-) diff --git a/src/components/practice/HintInfo.tsx b/src/components/practice/HintInfo.tsx index 6ae2e80..5de23a4 100644 --- a/src/components/practice/HintInfo.tsx +++ b/src/components/practice/HintInfo.tsx @@ -1,4 +1,3 @@ -import { motion } from 'framer-motion' import type { CellInfo } from '@/utils/practice' import { knowledgeAreaMap, processMap } from '@/data' @@ -13,72 +12,53 @@ export function HintInfo({ currentCell }: HintInfoProps) { const ka = knowledgeAreaMap.get(currentCell.knowledgeAreaId) if (!ka?.tailoringFactors || ka.tailoringFactors.length === 0) { return ( - -

- 敏捷裁剪因素 -

-

暂无裁剪因素信息

-
+
+ 暂无裁剪因素信息 +
) } return ( - -

+
+

敏捷裁剪因素

-
- {ka.tailoringFactors.map((factor, index) => ( -
-

- {factor.title} -

-

+

+ {ka.tailoringFactors.slice(0, 2).map((factor, index) => ( +
+ + {factor.title}: + + {factor.description} -

+
))} + {ka.tailoringFactors.length > 2 && ( +
+ +{ka.tailoringFactors.length - 2} 个因素... +
+ )}
- +
) } else { const process = processMap.get(currentCell.processId!) const purpose = process?.purpose return ( - -

+
+

主要作用

{purpose ? ( -

+

{purpose}

) : ( -

暂无主要作用说明

+

暂无主要作用说明

)} - +
) } } diff --git a/src/components/practice/KnowledgeAreaCell.tsx b/src/components/practice/KnowledgeAreaCell.tsx index 41f3e69..0f129d6 100644 --- a/src/components/practice/KnowledgeAreaCell.tsx +++ b/src/components/practice/KnowledgeAreaCell.tsx @@ -38,13 +38,13 @@ export function KnowledgeAreaCell({ onClick(cellId)} tabIndex={tabIndex} @@ -58,14 +58,14 @@ export function KnowledgeAreaCell({ transition={{ duration: 0.2 }} > {isAnswered && cellInfo && ( -
+
{ka.order} - + {cellInfo.answer}
diff --git a/src/components/practice/PracticeMatrix.tsx b/src/components/practice/PracticeMatrix.tsx index b139278..8d52100 100644 --- a/src/components/practice/PracticeMatrix.tsx +++ b/src/components/practice/PracticeMatrix.tsx @@ -28,19 +28,19 @@ export function PracticeMatrix({ const sortedPGs = [...processGroups].sort((a, b) => a.order - b.order) return ( -
+
{/* 表头 */}
{sortedPGs.map((pg) => (
{pg.name}
@@ -55,11 +55,11 @@ export function PracticeMatrix({ return (
{/* 知识领域格子(横跨5列) */} @@ -91,14 +91,14 @@ export function PracticeMatrix({