From cdc9531c164929d285c1ccc5d1ffa64c96d44968 Mon Sep 17 00:00:00 2001 From: ZhangXianQiang <1135831638@qq.com> Date: 星期二, 02 七月 2024 15:24:36 +0800 Subject: [PATCH] chore:添加播放器依赖 --- src/views/grade/components/answer-main/answer-single/index.vue | 16 ++++++++-------- 1 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/views/grade/components/answer-main/answer-single/index.vue b/src/views/grade/components/answer-main/answer-single/index.vue index ee1d28a..79b8ff4 100644 --- a/src/views/grade/components/answer-main/answer-single/index.vue +++ b/src/views/grade/components/answer-main/answer-single/index.vue @@ -38,24 +38,24 @@ import { computed, ref } from 'vue'; import { storeToRefs } from 'pinia'; import ExamInfo from '@/components/ExamInfo/index.vue'; -import { useExamStore } from '@/store/index.js'; -const examStore = useExamStore(); +import { useGradeStore } from '@/store/index.js'; +const gradeStore = useGradeStore(); -const { currentIndex } = storeToRefs(examStore); +const { currentIndex } = storeToRefs(gradeStore); -const activeQuestion = ref(examStore.getActiveQuestion); +const activeQuestion = ref(gradeStore.getActiveQuestion); const answerState = (item) => { + const flag = activeQuestion.value.correct === activeQuestion.value.right; if (item.prefix === activeQuestion.value.correct) { - const flag = activeQuestion.value.correct === activeQuestion.value.right; return { right: flag, wrong: !flag }; - } - if (item.prefix === activeQuestion.value.right) { + } else if(item.prefix === activeQuestion.value.right) { return { - right: true + right: !flag, + wrong: flag }; } }; -- Gitblit v1.8.0