|
@@ -12,10 +12,10 @@
|
|
|
</div>
|
|
|
<div class="reset">
|
|
|
<i-button type="warning" size="large" @click="() => answerQuestion(null)">重置答案</i-button>
|
|
|
- <span v-if="question.rightAnswer">
|
|
|
+ <span v-if="examShouldShowAnswer()">
|
|
|
<i-button type="info" size="large" @click="showAnswer">显示答案</i-button>
|
|
|
</span>
|
|
|
- <div v-if="question.rightAnswer && isShowAnswer">
|
|
|
+ <div v-if="examShouldShowAnswer() && isShowAnswer">
|
|
|
正确答案:<div>{{rightAnswerTransform}}</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -25,7 +25,9 @@
|
|
|
<script>
|
|
|
import QuestionBody from "./QuestionBody";
|
|
|
import { createNamespacedHelpers } from "vuex";
|
|
|
-const { mapMutations } = createNamespacedHelpers("examingHomeModule");
|
|
|
+const { mapMutations, mapGetters } = createNamespacedHelpers(
|
|
|
+ "examingHomeModule"
|
|
|
+);
|
|
|
|
|
|
const optionName = ["A", "B", "C", "D", "E", "F"];
|
|
|
export default {
|
|
@@ -53,6 +55,7 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
...mapMutations(["updateExamQuestion"]),
|
|
|
+ ...mapGetters(["examShouldShowAnswer"]),
|
|
|
keyup(e) {
|
|
|
if (
|
|
|
["BODY", "A", "BUTTON", "DIV"].includes(
|