Quellcode durchsuchen

显示答案前先将属性恢复默认

dusenyao vor 11 Monaten
Ursprung
Commit
0c0a43dc0d
1 geänderte Dateien mit 2 neuen und 4 gelöschten Zeilen
  1. 2 4
      src/views/home/recovery/ExerciseAnswerUserList.vue

+ 2 - 4
src/views/home/recovery/ExerciseAnswerUserList.vue

@@ -220,6 +220,7 @@ export default {
     },
     // 得到答题记录题目信息
     getQuestionInfo_AnswerRecord() {
+      this.$refs.exercise?.[0].showAnswer(false, false, { answer_list: [] }, true);
       GetQuestionInfo_AnswerRecord({
         answer_record_id: this.curAnswerRecordId,
         question_id: this.question_id,
@@ -240,10 +241,7 @@ export default {
         // 题目内容
         if (question.content) {
           this.currentQuestion = JSON.parse(question.content);
-          this.curQuestionPage =
-            this.questionList.length === 0 || this.curQuestionIndex < 0
-              ? ''
-              : this.previewComponents[this.questionList[this.curQuestionIndex].type];
+          this.curQuestionPage = this.previewComponents[this.questionList[this.curQuestionIndex].type];
         }
         this.is_objective = is_objective === 'true';
         this.user_answer.answer_status = answer_status;