From d5997848e6c44537773781d92b6033e61730ea07 Mon Sep 17 00:00:00 2001
From: user1 <10901603+no-distractions1@user.noreply.gitee.com>
Date: 星期三, 26 六月 2024 19:39:35 +0800
Subject: [PATCH] 艺术戏剧(选择题)

---
 src/components/dragQuestion/index.vue |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/components/dragQuestion/index.vue b/src/components/dragQuestion/index.vue
index 7d2f42d..13fe8dc 100644
--- a/src/components/dragQuestion/index.vue
+++ b/src/components/dragQuestion/index.vue
@@ -212,7 +212,7 @@
       this.moveDom = e.toElement;
       this.parentDom = this.getParentWithClass(e.toElement, "question-box");
       this.questionIndex = this.parentDom.getAttribute("num");
-      this.getSpaceInfo(this.parentDom);
+      if(!this.spaceList.length) this.getSpaceInfo(this.parentDom);
       const parentInfo = this.parentDom.getBoundingClientRect();
       this.parentX = parentInfo.x;
       this.parentY = parentInfo.y;
@@ -241,6 +241,7 @@
               e.y <= item.maxY
             ) {
               if(!this.isLift) return false
+              this.spaceList = this.spaceList.filter(citem => citem !== item)
               this.$set(
                 this.drageQuestion[this.questionIndex].userAnswer,
                 index,
@@ -274,8 +275,8 @@
         arr.push({
           minX: itemInfo.x -10,
           maxX: itemInfo.x + itemInfo.width + 10,
-          minY: itemInfo.y -10 ,
-          maxY: itemInfo.y + itemInfo.height + 10,
+          minY: itemInfo.y - 2 ,
+          maxY: itemInfo.y + itemInfo.height + 2,
         });
       }
       this.spaceList = arr;
@@ -406,6 +407,7 @@
   text-align: center;
   min-width: 60px !important;
   min-height: 15px !important;
+  text-indent: 0em;
 }
 .option-box {
   display: flex;
@@ -415,6 +417,7 @@
   cursor: pointer;
 }
 .stem {
+  text-indent: 2em;
   line-height: 2em;
 }
 .drag-bottom-btn {

--
Gitblit v1.9.1