瀏覽代碼

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

dusenyao 1 年之前
父節點
當前提交
0c0a43dc0d
共有 1 個文件被更改,包括 2 次插入4 次删除
  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;