user1
2024-06-25 19b6c60801dde069f2d482884890a367e6755b8c
Merge branch 'master' of http://182.92.203.7:2001/r/testbookLayout
1个文件已修改
5 ■■■■ 已修改文件
src/components/dragQuestion/index.vue 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/dragQuestion/index.vue
@@ -193,6 +193,7 @@
      maxX: null,
      maxY: null,
      spaceList: [],
      submitState:false,
    };
  },
  mounted() {
@@ -204,6 +205,7 @@
    // 3.限制鼠标松开要在空格的范围内
    mousedown(e) {
      e.preventDefault();
      if(this.submitState) return false
      console.log("鼠标按下", e);
      this.moveDom = e.toElement;
      this.parentDom = this.getParentWithClass(e.toElement, "question-box");
@@ -298,6 +300,7 @@
    },
    // 提交
    submitData() {
      this.submitState = true
      let arr = [];
      const data = this.drageQuestion;
      for (let index = 0; index < data.length; index++) {
@@ -309,10 +312,10 @@
        item.isRight = arr == item.answer
        item.isComplete = true
      }
      console.log(arr,this.drageQuestion[0]);
    },
    redio() {
      this.submitState = false
      localStorage.removeItem(
        this.config.activeBook.name + "-drag-" + this.page
      );