From 942ff0a739f38c0c3f7a9f1000c58f1d8f3abed6 Mon Sep 17 00:00:00 2001 From: yuetsh <517252939@qq.com> Date: Thu, 23 Apr 2026 18:24:15 -0600 Subject: [PATCH] update Co-authored-by: Copilot --- src/admin/api.ts | 4 +-- .../tutorial/components/ExerciseManager.vue | 27 +++++++++++-------- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/src/admin/api.ts b/src/admin/api.ts index e0fb00c..9cec296 100644 --- a/src/admin/api.ts +++ b/src/admin/api.ts @@ -271,7 +271,7 @@ export async function getAdminExercises(tutorialId: number) { export async function createExercise(data: { tutorial_id: number - type: "mcq" | "sort" + type: "mcq" | "sort" | "fill" data: object order: number }) { @@ -281,7 +281,7 @@ export async function createExercise(data: { export async function updateExercise(data: { id: number - type: "mcq" | "sort" + type: "mcq" | "sort" | "fill" data: object order: number }) { diff --git a/src/admin/tutorial/components/ExerciseManager.vue b/src/admin/tutorial/components/ExerciseManager.vue index 9237a67..9c42670 100644 --- a/src/admin/tutorial/components/ExerciseManager.vue +++ b/src/admin/tutorial/components/ExerciseManager.vue @@ -77,7 +77,7 @@ async function save() { let data: Record if (formType.value === "mcq") { data = { - question: mcqQuestion.value, + question: mcqQuestion.value || "下面选项中正确是哪个?", options: mcqOptions.value, answer: mcqAnswer.value, } @@ -171,16 +171,16 @@ function typeTagType(type: string): "success" | "info" | "warning" { 将 [[exercise:{{ ex.id }}]] 粘贴到 Markdown 内容中 编辑 - 删除 + + 删除 + @@ -211,7 +211,12 @@ function typeTagType(type: string): "success" | "info" | "warning" {