From 6e226cf788a6f06d90f20a2a8bd3306a4b73be82 Mon Sep 17 00:00:00 2001 From: ZhangXianQiang <1135831638@qq.com> Date: 星期四, 20 六月 2024 15:57:55 +0800 Subject: [PATCH] fix:修改考试时间 --- src/views/grade/components/answer-sheet/index.vue | 21 ++++++++++++++------- 1 files changed, 14 insertions(+), 7 deletions(-) diff --git a/src/views/grade/components/answer-sheet/index.vue b/src/views/grade/components/answer-sheet/index.vue index fef8708..0ce42b9 100644 --- a/src/views/grade/components/answer-sheet/index.vue +++ b/src/views/grade/components/answer-sheet/index.vue @@ -19,16 +19,19 @@ <script setup> import { ref } from 'vue'; import {storeToRefs} from 'pinia'; -import {useExamStore} from '@/store/index.js'; -const examStore = useExamStore(); +import {useGradeStore} from '@/store/index.js'; +const gradeStore = useGradeStore(); -const {examType, examDetail,currentType,currentIndex} = storeToRefs(examStore); +const {examType, examDetail,currentType,currentIndex} = storeToRefs(gradeStore); const activeNames = ref(examDetail.value.map(item => item.questionType)); const itemClass = (question,type,index) => { + console.log(question); + console.log(question.isRight); return { - answer: question.correct, + right: question.isRight, + wrong: !question.isRight, active: currentType.value === type && currentIndex.value === index } } @@ -55,9 +58,13 @@ .active { border-color: #3680fa; } -.answer { - border-color: #3680fa !important; - background-color: #3680fa !important; + +.right { + background-color: #67C23A !important; + color: #fff !important; +} +.wrong { + background-color: #F56C6C !important; color: #fff !important; } </style> \ No newline at end of file -- Gitblit v1.8.0