From 2a9417ff2fe99c9064985a4aca40739ef7b23e69 Mon Sep 17 00:00:00 2001
From: ZhangXianQiang <1135831638@qq.com>
Date: 星期三, 19 六月 2024 17:47:57 +0800
Subject: [PATCH] feat:答题状态

---
 src/views/grade/index.vue |   15 ++++++++++-----
 1 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/src/views/grade/index.vue b/src/views/grade/index.vue
index c528c4a..db604db 100644
--- a/src/views/grade/index.vue
+++ b/src/views/grade/index.vue
@@ -49,6 +49,7 @@
               <div class="main-wrapper w-full grow relative my-5">
                 <div class="main-content absolute top-0 bottom-0 w-full">
                   <Transition appear name="fade-transform" mode="out-in">
+                    <component :is="typeComponent[currentType]" :key="currentIndex"></component>
                   </Transition>
                 </div>
               </div>
@@ -80,6 +81,10 @@
 import AnswerTag from './components/answer-tag/index.vue';
 import AnswerSheet from './components/answer-sheet/index.vue';
 
+import AnswerSingle from './components/answer-main/answer-single/index.vue';
+import AnswerMultiple from './components/answer-main/answer-multiple/index.vue';
+import AnswerAudio from './components/answer-main/answer-audio/index.vue';
+
 import { useGradeStore } from '@/store/index.js';
 import { useRouter } from 'vue-router';
 
@@ -88,11 +93,11 @@
 const gradeStore = useGradeStore();
 const { currentType, currentIndex, examDetail, examType, examInfo } = storeToRefs(gradeStore);
 
-// const typeComponent = {
-//   1: AnswerSingle,
-//   2: AnswerMultiple,
-//   3: AnswerAudio,
-// };
+const typeComponent = {
+  1: AnswerSingle,
+  2: AnswerMultiple,
+  3: AnswerAudio,
+};
 
 
 const prevQuestion = () => {

--
Gitblit v1.8.0