From 95994b14d0aaf8d2c583a74955a7a41f5e534a51 Mon Sep 17 00:00:00 2001 From: jacobxu666 Date: Thu, 20 Aug 2026 15:24:10 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=95=E5=8D=B7=E7=BC=96=E8=BE=91=E9=A1=B5?= =?UTF-8?q?=E4=B8=89=E5=A4=84=E5=B8=83=E5=B1=80=E4=BC=98=E5=8C=96:?= =?UTF-8?q?=E5=A4=B4=E9=83=A8=E6=A0=87=E9=A2=98=E7=8B=AC=E7=AB=8B=E6=88=90?= =?UTF-8?q?=E8=A1=8C=E5=8F=AF=E6=8D=A2=E8=A1=8C=E3=80=81=E7=BD=91=E6=A0=BC?= =?UTF-8?q?=E6=98=BE=E5=BC=8F=E5=8D=95=E5=88=97+=E5=85=83=E7=B4=A0?= =?UTF-8?q?=E8=87=AA=E9=80=82=E5=BA=94=E3=80=81=E9=A2=98=E7=9B=AE=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E8=A1=A8=E5=8D=95=E6=B8=B2=E6=9F=93=E5=9C=A8=E8=A2=AB?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E9=A2=98=E4=B8=8B=E6=96=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Haiku 4.5 --- src/app/parent/exams/[paperId]/page.tsx | 4 +- src/app/parent/exams/new/page.tsx | 4 +- src/app/parent/exams/paper-form.tsx | 4 +- src/app/parent/exams/question-list.tsx | 73 ++++++++++++++----------- 4 files changed, 46 insertions(+), 39 deletions(-) diff --git a/src/app/parent/exams/[paperId]/page.tsx b/src/app/parent/exams/[paperId]/page.tsx index 9b9e2e3..4ad3af0 100644 --- a/src/app/parent/exams/[paperId]/page.tsx +++ b/src/app/parent/exams/[paperId]/page.tsx @@ -17,11 +17,11 @@ export default async function EditExamPage({ params }: { params: Promise<{ paper return (
-
+
← 试卷列表 -

{paper.title}

+

{paper.title}

-
+
← 试卷列表 -

新建试卷

+

新建试卷

diff --git a/src/app/parent/exams/paper-form.tsx b/src/app/parent/exams/paper-form.tsx index 8370659..658219f 100644 --- a/src/app/parent/exams/paper-form.tsx +++ b/src/app/parent/exams/paper-form.tsx @@ -89,7 +89,7 @@ export function PaperForm({ paper, isNew }: { paper: PaperMeta | null; isNew: bo return (
-
+
@@ -165,7 +165,7 @@ export function PaperForm({ paper, isNew }: { paper: PaperMeta | null; isNew: bo
{msg &&

{msg.text}

} -
+
diff --git a/src/app/parent/exams/question-list.tsx b/src/app/parent/exams/question-list.tsx index bb8ad06..ee389a8 100644 --- a/src/app/parent/exams/question-list.tsx +++ b/src/app/parent/exams/question-list.tsx @@ -1,6 +1,6 @@ "use client"; -import { useState } from "react"; +import { Fragment, useState } from "react"; import { ArrowDown, ArrowUp, Pencil, Plus, Trash2, X } from "lucide-react"; import { Button } from "@/components/ui/button"; import { Input } from "@/components/ui/input"; @@ -72,37 +72,10 @@ export function QuestionList({ onChange(next); }; - return ( -
- {value.map((q, i) => { - const def = q as QuizQ; - return ( -
-
- {TYPE_LABEL[def.type]} - {def.stem} - - - - - - -
-
- ); - })} - - {draft ? ( -
-
+ // xuchao: 编辑表单——编辑存量题渲染在该题卡片下方,新增时渲染在列表末尾 + const draftForm = draft ? ( +
+