From 92845ee4a3898c4c65bc85bbbe777e4595897e3d Mon Sep 17 00:00:00 2001
From: 闫增涛 <1829501689@qq.com>
Date: 星期二, 02 七月 2024 14:43:29 +0800
Subject: [PATCH] 语音阅读小窗

---
 src/views/examination/components/list.vue |   25 +++++++++++++++++--------
 1 files changed, 17 insertions(+), 8 deletions(-)

diff --git a/src/views/examination/components/list.vue b/src/views/examination/components/list.vue
index 216bf7a..818d7dc 100644
--- a/src/views/examination/components/list.vue
+++ b/src/views/examination/components/list.vue
@@ -238,13 +238,14 @@
                     style="margin-left: 20px"
                   >
                     <span>鎮ㄧ殑绛旀锛�</span>
-                    <span class="errorBox" v-if="isHaveAnswer(value.userAnswer)">{{
-                      arrayToString(value.userAnswer)
+                    <span class="errorBox" >{{
+                      arrayToString(value.userAnswer) ? arrayToString(value.userAnswer) : '-'
                     }}</span>
+
                   </p>
                 </li>
                 <li>
-                  <p class="difficulty" v-if="value.difficulty">
+                  <div class="difficulty" v-if="value.difficulty">
                         <span style="color: #333">闅惧害绛夌骇锛�</span>
                         <el-rate
                           v-model="value.difficulty"
@@ -253,7 +254,7 @@
                           disabled
                           disabled-void-color="#949494"
                         />
-                      </p>
+                      </div>
                 </li>
               </ul>
               <el-collapse
@@ -339,7 +340,7 @@
   // if (props.collectList) presentId.value = props.collectList[0]
 })
 // 鏁扮粍杞负瀛楃涓叉柟娉�
-const arrayToString = (data) => {
+const arrayToString = (data:any) => {
   // 妫�鏌ユ槸鍚︿负鏁扮粍
   if (Array.isArray(data)) {
     // 浣跨敤 join 鏂规硶灏嗘暟缁勮浆鎹负瀛楃涓诧紝榛樿浣跨敤閫楀彿鍒嗛殧
@@ -349,7 +350,7 @@
     return data.replace(/<[^>]*>/g, '')
   }
 }
-const isHaveAnswer = (data) => {
+const isHaveAnswer = (data:any) => {
   if (typeof data == 'string') {
     data = data
       .replace(/<[^>]*>/g, '')
@@ -370,7 +371,7 @@
   }
 }
 // 鏀惰棌鎸夐挳
-const handleCollect = (num,number) => {
+const handleCollect = (num:number,number:number) => {
   emits('setCollect',num,number)
 }
 // 鍗曢�夋杈撳叆
@@ -380,6 +381,9 @@
 </script>
 
 <style lang="less" scoped>
+.catalogName {
+  margin-top: 40px;
+}
 .collect-png {
   cursor: pointer;
   width: 24px;
@@ -444,6 +448,7 @@
   margin-top: 20px;
   display: flex;
   justify-content: space-between;
+  align-items: flex-start;
   .titleContent {
     width: 95%;
     display: flex;
@@ -592,7 +597,7 @@
   color: #fff;
   .mark-error,.mark-correct {
     white-space: nowrap;
-    height: 20px;
+    min-height: 20px;
     line-height: 18px;
     padding: 2px 8px;
     margin-right: 5px;
@@ -624,6 +629,10 @@
         color: #FF5E5E;
       }
     }
+.difficulty {
+  display: flex;
+  align-items: center;
+}
 .analysis-box {
   padding: 10px 0;
 }

--
Gitblit v1.9.1