Просмотр исходного кода

选择题添加最多10个选项

Michael Wang 6 лет назад
Родитель
Сommit
1926b152af

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

@@ -72,7 +72,7 @@
 </template>
 
 <script>
-const optionName = "ABCDEF".split("");
+const optionName = "ABCDEFGHIJ".split("");
 
 export default {
   name: "ExamPaper",

+ 3 - 2
src/features/OnlineExam/Examing/MultipleQuestionView.vue

@@ -65,7 +65,7 @@ const { mapMutations, mapGetters } = createNamespacedHelpers(
   "examingHomeModule"
 );
 
-const optionName = "ABCDEF".split("");
+const optionName = "ABCDEFGHIJ".split("");
 export default {
   name: "MultipleQuestionView",
   data() {
@@ -101,7 +101,8 @@ export default {
           ["checkbox", "radio"].includes(document.activeElement.type))
       ) {
         if (
-          ["KeyA", "KeyB", "KeyC", "KeyD", "KeyE", "KeyF", "KeyG"]
+          optionName
+            .map(v => "Key" + v)
             .slice(0, this.question.questionOptionList.length)
             .includes(e.code)
         ) {

+ 3 - 2
src/features/OnlineExam/Examing/SingleQuestionView.vue

@@ -71,7 +71,7 @@ const { mapMutations, mapGetters } = createNamespacedHelpers(
   "examingHomeModule"
 );
 
-const optionName = ["A", "B", "C", "D", "E", "F"];
+const optionName = "ABCDEFGHIJ".split("");
 export default {
   name: "SingleQuestionView",
   data() {
@@ -107,7 +107,8 @@ export default {
           ["checkbox", "radio"].includes(document.activeElement.type))
       ) {
         if (
-          ["KeyA", "KeyB", "KeyC", "KeyD", "KeyE", "KeyF", "KeyG"]
+          optionName
+            .map(v => "Key" + v)
             .slice(0, this.question.questionOptionList.length)
             .includes(e.code)
         ) {