feat(练习): 优化辅助信息显示和布局
- 裁剪因素只显示标题,用分号分隔(不显示描述问题) - 裁剪因素和主要作用字号从 text-xs/text-sm 增大到 text-base - 输入区域 py-4 改为 py-3,向上收紧 - 底部固定区域添加 mb-8 增加底部偏移 - 辅助信息区域 max-h-48 改为 max-h-40 via [HAPI](https://hapi.run) Co-Authored-By: HAPI <noreply@hapi.run>
This commit is contained in:
@@ -12,7 +12,7 @@ export function HintInfo({ currentCell }: HintInfoProps) {
|
||||
const ka = knowledgeAreaMap.get(currentCell.knowledgeAreaId)
|
||||
if (!ka?.tailoringFactors || ka.tailoringFactors.length === 0) {
|
||||
return (
|
||||
<div className="text-sm text-gray-500 dark:text-gray-400">
|
||||
<div className="text-base text-gray-500 dark:text-gray-400">
|
||||
暂无裁剪因素信息
|
||||
</div>
|
||||
)
|
||||
@@ -20,21 +20,12 @@ export function HintInfo({ currentCell }: HintInfoProps) {
|
||||
|
||||
return (
|
||||
<div className="space-y-2">
|
||||
<h3 className="text-sm font-semibold text-gray-900 dark:text-gray-100">
|
||||
<h3 className="text-base font-semibold text-gray-900 dark:text-gray-100">
|
||||
敏捷裁剪因素
|
||||
</h3>
|
||||
<div className="space-y-2 text-xs">
|
||||
{ka.tailoringFactors.map((factor, index) => (
|
||||
<div key={index} className="flex gap-2">
|
||||
<span className="font-medium text-gray-700 dark:text-gray-300 shrink-0">
|
||||
{factor.title}:
|
||||
</span>
|
||||
<span className="text-gray-600 dark:text-gray-400">
|
||||
{factor.description}
|
||||
</span>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
<p className="text-base text-gray-700 dark:text-gray-300 leading-relaxed">
|
||||
{ka.tailoringFactors.map((factor) => factor.title).join(';')}
|
||||
</p>
|
||||
</div>
|
||||
)
|
||||
} else {
|
||||
@@ -43,15 +34,15 @@ export function HintInfo({ currentCell }: HintInfoProps) {
|
||||
|
||||
return (
|
||||
<div>
|
||||
<h3 className="text-sm font-semibold text-gray-900 dark:text-gray-100 mb-1">
|
||||
<h3 className="text-base font-semibold text-gray-900 dark:text-gray-100 mb-2">
|
||||
主要作用
|
||||
</h3>
|
||||
{purpose ? (
|
||||
<p className="text-xs text-gray-700 dark:text-gray-300 leading-relaxed">
|
||||
<p className="text-base text-gray-700 dark:text-gray-300 leading-relaxed">
|
||||
{purpose}
|
||||
</p>
|
||||
) : (
|
||||
<p className="text-xs text-gray-500 dark:text-gray-400">暂无主要作用说明</p>
|
||||
<p className="text-base text-gray-500 dark:text-gray-400">暂无主要作用说明</p>
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
|
||||
@@ -423,10 +423,10 @@ export default function ProcessPracticePage() {
|
||||
</div>
|
||||
|
||||
{/* 底部固定区域(粘附底部,参与文档流) */}
|
||||
<div className="sticky bottom-0 bg-white/60 dark:bg-gray-800/60 backdrop-blur-md border-t border-gray-200 dark:border-gray-700 z-10">
|
||||
<div className="sticky bottom-0 bg-white/60 dark:bg-gray-800/60 backdrop-blur-md border-t border-gray-200 dark:border-gray-700 z-10 mb-8">
|
||||
<div className="max-w-7xl mx-auto px-6">
|
||||
{/* 输入区域 */}
|
||||
<div className="py-4 border-b border-gray-200/50 dark:border-gray-700/50">
|
||||
<div className="py-3 border-b border-gray-200/50 dark:border-gray-700/50">
|
||||
<div className="flex items-center justify-center gap-3">
|
||||
<InputArea
|
||||
userInput={userInput}
|
||||
@@ -454,7 +454,7 @@ export default function ProcessPracticePage() {
|
||||
</div>
|
||||
|
||||
{/* 辅助信息区域 */}
|
||||
<div className="py-3 px-4 max-h-48 overflow-y-auto">
|
||||
<div className="py-3 px-4 max-h-40 overflow-y-auto">
|
||||
<HintInfo currentCell={currentCell} />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user