|
@@ -10,7 +10,7 @@
|
|
</template>
|
|
</template>
|
|
</div>
|
|
</div>
|
|
<div class="tips">
|
|
<div class="tips">
|
|
- 方向键 → 下一题。方向键 ← 上一题。<br>A、B、C、D来勾选选项。Y、N来勾选判断题。
|
|
|
|
|
|
+ A、B、C、D来勾选选项。Y、N来勾选判断题。
|
|
</div>
|
|
</div>
|
|
<div class="next">
|
|
<div class="next">
|
|
<template v-if="nextQuestionOrder">
|
|
<template v-if="nextQuestionOrder">
|
|
@@ -45,20 +45,20 @@ export default {
|
|
keyup(e) {
|
|
keyup(e) {
|
|
// console.log(e);
|
|
// console.log(e);
|
|
// console.log(document.activeElement.type);
|
|
// console.log(document.activeElement.type);
|
|
- if (
|
|
|
|
- ["BODY", "A", "BUTTON", "DIV"].includes(
|
|
|
|
- document.activeElement.tagName
|
|
|
|
- ) ||
|
|
|
|
- (["INPUT"].includes(document.activeElement.tagName) &&
|
|
|
|
- ["checkbox", "radio"].includes(document.activeElement.type))
|
|
|
|
- ) {
|
|
|
|
- if (e.code === "ArrowRight" && this.nextQuestionOrder) {
|
|
|
|
- this.goToNextQuestion();
|
|
|
|
- }
|
|
|
|
- if (e.code === "ArrowLeft" && this.previousQuestionOrder) {
|
|
|
|
- this.goToPreviousQuestion();
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ // if (
|
|
|
|
+ // ["BODY", "A", "BUTTON", "DIV"].includes(
|
|
|
|
+ // document.activeElement.tagName
|
|
|
|
+ // ) ||
|
|
|
|
+ // (["INPUT"].includes(document.activeElement.tagName) &&
|
|
|
|
+ // ["checkbox", "radio"].includes(document.activeElement.type))
|
|
|
|
+ // ) {
|
|
|
|
+ // if (e.code === "ArrowRight" && this.nextQuestionOrder) {
|
|
|
|
+ // this.goToNextQuestion();
|
|
|
|
+ // }
|
|
|
|
+ // if (e.code === "ArrowLeft" && this.previousQuestionOrder) {
|
|
|
|
+ // this.goToPreviousQuestion();
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
},
|
|
},
|
|
goToNextQuestion() {
|
|
goToNextQuestion() {
|
|
this.$router.push({
|
|
this.$router.push({
|