From 2205a3f4fa8aaeb0a2d21dc11d7e1039a5ee3ece Mon Sep 17 00:00:00 2001 From: Cxx0822 <1556464090@qq.com> Date: Sun, 9 Aug 2026 19:45:49 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8D=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E4=B8=8D=E5=88=B0=E5=AD=A6=E7=A7=91=E5=90=8D=E7=A7=B0=E7=9A=84?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/exam/ExamDialog.vue | 1 + src/components/question/QuestionList.vue | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/exam/ExamDialog.vue b/src/components/exam/ExamDialog.vue index 2f7e5e3..d36db11 100644 --- a/src/components/exam/ExamDialog.vue +++ b/src/components/exam/ExamDialog.vue @@ -71,6 +71,7 @@ const confirmClick = async (formEl: FormInstance | undefined) => { } const generateExam = async () => { + libraryStore.selectedSubject = examStore.config.subject questionStore.questionContent = '' const loading = ElLoading.service({ diff --git a/src/components/question/QuestionList.vue b/src/components/question/QuestionList.vue index 8bec346..173aa60 100644 --- a/src/components/question/QuestionList.vue +++ b/src/components/question/QuestionList.vue @@ -83,7 +83,7 @@ const addRecord = async () => { correctCount, wrongCount } - await recordStore.addRecord(libraryStore.currentFile.subject) + await recordStore.addRecord(libraryStore.selectedSubject as string) await ElMessageBox.alert( `共 ${totalCount} 题 · 正确 ${correctCount} · 错误 ${wrongCount}`, @@ -107,7 +107,7 @@ const addMistakeList = async () => { } mistakeStore.currentMistakes.push(mistake) }) - await mistakeStore.addMistakeList(libraryStore.currentFile.subject) + await mistakeStore.addMistakeList(libraryStore.selectedSubject as string) }