From d76a5555a5f423dbcaa082619c00ab55a0912884 Mon Sep 17 00:00:00 2001
From: 闫增涛 <1829501689@qq.com>
Date: 星期二, 25 六月 2024 09:26:38 +0800
Subject: [PATCH] 拖拽题优化

---
 src/components/dragQuestion/index.vue |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/src/components/dragQuestion/index.vue b/src/components/dragQuestion/index.vue
index 61135e1..f8e81da 100644
--- a/src/components/dragQuestion/index.vue
+++ b/src/components/dragQuestion/index.vue
@@ -9,7 +9,7 @@
       class="question-box"
     >
       <!-- 棰樺共 -->
-      <div>
+      <div class="stem">
         <span v-for="(ditem, dindex) in item.stem" :key="dindex">
           <span v-if="typeof ditem == 'string'">
             {{ ditem }}
@@ -76,7 +76,7 @@
                   />
                 </p>
                 <!-- 姝g‘閿欒鍥炬爣 -->
-                <span class="mr-10">
+                <span class="mr-10 judge-icon">
                   <svg
                     v-if="item.isRight"
                     t="1716986419862"
@@ -307,6 +307,7 @@
           arr[cindex] = citem.value
         }
         item.isRight = arr == item.answer
+        item.isComplete = true
       }
       
       console.log(arr,this.drageQuestion[0]);
@@ -319,6 +320,7 @@
       // const data = []
       for (let index = 0; index < this.drageQuestion.length; index++) {
         const item = this.drageQuestion[index];
+        item.isComplete = false
         for (let cindex = 0; cindex < item.option.length; cindex++) {
           const citem = item.option[cindex];
           arr.push(
@@ -402,6 +404,9 @@
 .drag-option {
   cursor: pointer;
 }
+.stem {
+  line-height: 2em;
+}
 .drag-bottom-btn {
   width: 100%;
   display: flex;
@@ -418,6 +423,10 @@
   width: 94%;
   // margin-left: 12px;
 }
+.judge-icon {
+  display: flex;
+  align-items: center;
+}
 .el-collapse {
   width: 100%;
 }

--
Gitblit v1.9.1