Przeglądaj źródła

切换题目后,马上更新题目状态,不再停留在旧题目

Michael Wang 5 lat temu
rodzic
commit
d718401817
1 zmienionych plików z 2 dodań i 4 usunięć
  1. 2 4
      src/features/OnlineExam/Examing/QuestionView.vue

+ 2 - 4
src/features/OnlineExam/Examing/QuestionView.vue

@@ -95,7 +95,8 @@ export default {
     async updateQuestion() {
       const currentExamQuestion = this.examQuestion; // 避免以后执行时,this.examQuestion换掉了
       const examRecordDataId = this.$route.params.examRecordDataId;
-
+      this.parentQuestionBody = null;
+      this.question = null;
       let qContentRes = null;
       try {
         qContentRes = await this.$http.get(
@@ -110,10 +111,7 @@ export default {
           console.log(
             "QuestionView: 如果网络异常,又离开本页面后,不再后续处理此请求 "
           );
-          return;
         }
-        this.parentQuestionBody = null;
-        this.question = null;
         return;
       }