From 4800366c4ae36b4900b34b7f183390fd9cd0d33b Mon Sep 17 00:00:00 2001
From: fuliqi <fuliqi@qq.com>
Date: 星期一, 28 十月 2024 18:45:14 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master' into test
---
src/components/ExamInfo/index.vue | 28 ++++++++++++++++++++--------
1 files changed, 20 insertions(+), 8 deletions(-)
diff --git a/src/components/ExamInfo/index.vue b/src/components/ExamInfo/index.vue
index 2b63fd1..823d52c 100644
--- a/src/components/ExamInfo/index.vue
+++ b/src/components/ExamInfo/index.vue
@@ -1,24 +1,30 @@
<template>
<div class="info-container w-full">
- <div class="exam-title break-all mb-4 text-base text-gray-700">
- {{ title }}
+ <div class="exam-title break-all mb-4 text-base text-gray-700" v-html="activeQuestion.title">
</div>
- <div class="img-container flex">
+
+ <div class="audio-container" v-if="activeQuestion.audioFile">
+ <ExamAudio :audioSrc="'/api/files/' +activeQuestion.audioFile"></ExamAudio>
+ </div>
+
+ <div class="img-container flex" v-if="activeQuestion.img">
<div class="img-item">
- <img src="@/assets/test.png" class="info-img" alt="">
+ <img :src="activeQuestion.img" class="info-img" alt="">
</div>
</div>
</div>
</template>
<script setup>
+import ExamAudio from '@/components/ExamAudio/index.vue';
+
const props = defineProps({
questionIndex: {
type: Number,
required: true
},
- title: {
- type: String,
+ activeQuestion: {
+ type: Object,
required: true
}
})
@@ -27,6 +33,12 @@
<style lang="scss" scoped>
.info-img {
max-height: 250px;
- margin: 20px 0;
+ margin: 20px 10px;
}
-</style>
\ No newline at end of file
+.exam-title {
+ :deep(p) {
+ display: flex !important;
+ }
+}
+
+</style>
--
Gitblit v1.8.0