闫增涛
2024-06-25 072a7e40cd776d34334a496405a952f1032ac591
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 {
@@ -495,7 +498,7 @@
          color: #ee1818;
          span {
            height: min-content;
            width: 100px;
            width: 115px;
          }
          .errorBox {
            width: 100px;