fix:修复获取不到学科名称的错误
This commit is contained in:
@@ -71,6 +71,7 @@ const confirmClick = async (formEl: FormInstance | undefined) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const generateExam = async () => {
|
const generateExam = async () => {
|
||||||
|
libraryStore.selectedSubject = examStore.config.subject
|
||||||
questionStore.questionContent = ''
|
questionStore.questionContent = ''
|
||||||
|
|
||||||
const loading = ElLoading.service({
|
const loading = ElLoading.service({
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ const addRecord = async () => {
|
|||||||
correctCount,
|
correctCount,
|
||||||
wrongCount
|
wrongCount
|
||||||
}
|
}
|
||||||
await recordStore.addRecord(libraryStore.currentFile.subject)
|
await recordStore.addRecord(libraryStore.selectedSubject as string)
|
||||||
|
|
||||||
await ElMessageBox.alert(
|
await ElMessageBox.alert(
|
||||||
`共 ${totalCount} 题 · 正确 ${correctCount} · 错误 ${wrongCount}`,
|
`共 ${totalCount} 题 · 正确 ${correctCount} · 错误 ${wrongCount}`,
|
||||||
@@ -107,7 +107,7 @@ const addMistakeList = async () => {
|
|||||||
}
|
}
|
||||||
mistakeStore.currentMistakes.push(mistake)
|
mistakeStore.currentMistakes.push(mistake)
|
||||||
})
|
})
|
||||||
await mistakeStore.addMistakeList(libraryStore.currentFile.subject)
|
await mistakeStore.addMistakeList(libraryStore.selectedSubject as string)
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user