fix:修复获取不到学科名称的错误
This commit is contained in:
@@ -71,6 +71,7 @@ const confirmClick = async (formEl: FormInstance | undefined) => {
|
||||
}
|
||||
|
||||
const generateExam = async () => {
|
||||
libraryStore.selectedSubject = examStore.config.subject
|
||||
questionStore.questionContent = ''
|
||||
|
||||
const loading = ElLoading.service({
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user