ZhangXianQiang
2024-06-19 2fab8e8add4721e42b5897941e37617c8f7c6b3f
src/views/grade/components/answer-sheet/index.vue
@@ -19,16 +19,17 @@
<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
  }
}
@@ -55,9 +56,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>