| | |
| | | </template> |
| | | |
| | | <script setup> |
| | | import { ref } from 'vue'; |
| | | import { ref, onMounted } from 'vue'; |
| | | import {storeToRefs} from 'pinia'; |
| | | import ExamInfo from '@/components/ExamInfo/index.vue'; |
| | | import {useExamStore} from '@/store/index.js'; |
| | | const examStore = useExamStore(); |
| | | |
| | | const {currentType,currentIndex,activeQuestion,examDetail} = storeToRefs(examStore); |
| | | const {currentType,currentIndex,examDetail} = storeToRefs(examStore); |
| | | |
| | | const activeQuestion = ref(examStore.getActiveQuestion); |
| | | |
| | | const answerClick = (item) => { |
| | | if(item) { |
| | | resetAnswer(); |
| | | item.isActive = true; |
| | | |
| | | examStore.setQuestionAnswer(currentType.value, currentIndex.value, item.prefix); |
| | | } |
| | | }; |
| | | |
| | |
| | | activeQuestion.value.items.forEach(item => item.isActive = false); |
| | | } |
| | | |
| | | const filterExam = () => { |
| | | |
| | | } |
| | | |
| | | </script> |
| | | |