diff --git a/src/admin/api.ts b/src/admin/api.ts index 2e68b2c..e0fb00c 100644 --- a/src/admin/api.ts +++ b/src/admin/api.ts @@ -263,7 +263,9 @@ export function setTutorialVisibility(id: number, is_public: boolean) { } export async function getAdminExercises(tutorialId: number) { - const res = await http.get("admin/exercise", { params: { tutorial_id: tutorialId } }) + const res = await http.get("admin/exercise", { + params: { tutorial_id: tutorialId }, + }) return res.data as Exercise[] } diff --git a/src/admin/tutorial/components/ExerciseManager.vue b/src/admin/tutorial/components/ExerciseManager.vue index c538ca3..9237a67 100644 --- a/src/admin/tutorial/components/ExerciseManager.vue +++ b/src/admin/tutorial/components/ExerciseManager.vue @@ -1,5 +1,10 @@ @@ -110,7 +150,9 @@ function typeName(type: string) {
共 {{ exercises.length }} 道练习题 - + 添加练习题 + + 添加练习题 @@ -119,11 +161,7 @@ function typeName(type: string) {
- + {{ typeName(ex.type) }} @@ -133,12 +171,16 @@ function typeName(type: string) { 将 [[exercise:{{ ex.id }}]] 粘贴到 Markdown 内容中 编辑 - 删除 + 删除 @@ -155,11 +197,16 @@ function typeName(type: string) { 选择题 代码排序 + 代码填空 - + -