| | |
| | | import {useExamStore} from '@/store/index.js'; |
| | | const examStore = useExamStore(); |
| | | |
| | | const {examType, examDetail,currentType,currentIndex} = storeToRefs(examStore); |
| | | const {examDetail,currentType,currentIndex} = storeToRefs(examStore); |
| | | |
| | | const activeNames = ref(examDetail.value.map(item => item.questionType)); |
| | | |
| | | const itemClass = (question,type,index) => { |
| | | return { |
| | | answer: question.answer || (question.answerList && question.answerList.length), |
| | | answer: question.answer || checkAnswerList(question.answerList), |
| | | active: currentType.value === type && currentIndex.value === index |
| | | } |
| | | } |
| | |
| | | currentIndex.value = index; |
| | | } |
| | | |
| | | |
| | | const checkAnswerList = (answerList) => { |
| | | return Array.isArray(answerList) && answerList.length && answerList.every(item => item); |
| | | } |
| | | |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |