fix:修复获取不到学科名称的错误

This commit is contained in:
2026-08-09 19:45:49 +08:00
parent 1a63e14e82
commit 2205a3f4fa
2 changed files with 3 additions and 2 deletions

View File

@@ -71,6 +71,7 @@ const confirmClick = async (formEl: FormInstance | undefined) => {
}
const generateExam = async () => {
libraryStore.selectedSubject = examStore.config.subject
questionStore.questionContent = ''
const loading = ElLoading.service({

View File

@@ -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)
}
</script>