Przeglądaj źródła

练习:主观题答案的展示

Michael Wang 6 lat temu
rodzic
commit
2817003856
1 zmienionych plików z 3 dodań i 1 usunięć
  1. 3 1
      src/features/OnlineExam/Examing/ExamPaper.vue

+ 3 - 1
src/features/OnlineExam/Examing/ExamPaper.vue

@@ -250,7 +250,9 @@ export default {
         }
         return { true: "正确", false: "错误" }[studentAnswer.join("")];
       }
-      return studentAnswer.join("");
+      return typeof studentAnswer === "string"
+        ? studentAnswer
+        : studentAnswer.join("");
     }
   },
   computed: {},