| | |
| | | <ExamInfo class="mb-5" :questionIndex="currentIndex" :activeQuestion="activeQuestion"></ExamInfo> |
| | | |
| | | <div class="answer-content"> |
| | | <div class="answer-item flex" v-for="item, index in activeQuestion.items" |
| | | :class="answerState(item)"> |
| | | <div class="answer-item flex" v-for="item, index in activeQuestion.items" :class="answerState(item)"> |
| | | <div class="answer-icon flex flex-col justify-center items-center flex-shrink-0">{{ item.prefix }}</div> |
| | | <div class="answer-text text-gray-700">{{ item.content }}</div> |
| | | </div> |
| | |
| | | <div class="analysis-container"> |
| | | <div class="analysis-item" :class="analysisState"> |
| | | <div class="item-label">您的答案</div> |
| | | <div class="item-info">{{ activeQuestion.correct ? activeQuestion.correct: '未作答' }}</div> |
| | | <div class="item-info">{{ activeQuestion.correct ? activeQuestion.correct : '未作答' }}</div> |
| | | </div> |
| | | |
| | | <div class="analysis-item analysis-right"> |
| | |
| | | |
| | | |
| | | const answerState = (item) => { |
| | | const flag = activeQuestion.value.correct === activeQuestion.value.right; |
| | | if (item.prefix === activeQuestion.value.correct) { |
| | | const flag = activeQuestion.value.correct === activeQuestion.value.right; |
| | | return { |
| | | right: flag, |
| | | wrong: !flag |
| | | }; |
| | | } |
| | | if (item.prefix === activeQuestion.value.right) { |
| | | } else if(item.prefix === activeQuestion.value.right) { |
| | | return { |
| | | right: true |
| | | right: !flag, |
| | | wrong: flag |
| | | }; |
| | | } |
| | | }; |
| | |
| | | --right-color: #67c23a; |
| | | --wrong-color: #f56c6c; |
| | | } |
| | | |
| | | .answer-item { |
| | | max-width: 500px; |
| | | border-radius: 10px; |
| | |
| | | } |
| | | } |
| | | |
| | | .right { |
| | | border-color: var(--right-color) !important; |
| | | background-color: rgba($color: #67c23a, $alpha: 0.2) !important; |
| | | |
| | | .answer-icon { |
| | | color: #ffffff !important; |
| | | border-color: var(--right-color) !important; |
| | | background-color: var(--right-color) !important; |
| | | } |
| | | |
| | | .answer-text { |
| | | color: var(--right-color) !important; |
| | | } |
| | | } |
| | | |
| | | .wrong { |
| | | border-color: var(--wrong-color) !important; |
| | | background-color: rgba($color: #f56c6c, $alpha: 0.2) !important; |