| | |
| | | <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) => { |
| | | return { |
| | | answer: question.correct, |
| | | right: question.isRight, |
| | | wrong: !question.isRight, |
| | | active: currentType.value === type && currentIndex.value === index |
| | | } |
| | | } |
| | |
| | | .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> |