Browse Source

左右方向键仅切换题目

Michael Wang 3 years ago
parent
commit
fad1d34504
1 changed files with 2 additions and 0 deletions
  1. 2 0
      src/features/mark/MarkBoardKeyBoard.vue

+ 2 - 0
src/features/mark/MarkBoardKeyBoard.vue

@@ -238,6 +238,7 @@ function numberKeyListener(event: KeyboardEvent) {
     if (idx > 0) {
       chooseQuestion(store.currentTask.questionList[idx - 1]);
     }
+    event.preventDefault();
     return;
   }
   if (event.key === "ArrowRight") {
@@ -245,6 +246,7 @@ function numberKeyListener(event: KeyboardEvent) {
     if (idx < store.currentTask.questionList.length - 1) {
       chooseQuestion(store.currentTask.questionList[idx + 1]);
     }
+    event.preventDefault();
     return;
   }
   // 处理回退删除分数