闫增涛
2024-06-25 d76a5555a5f423dbcaa082619c00ab55a0912884
拖拽题优化
3个文件已修改
19 ■■■■ 已修改文件
src/App.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/books/mathBook/view/components/chapter001.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/dragQuestion/index.vue 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/App.vue
@@ -65,7 +65,7 @@
        process.env.VUE_APP_RESOURCE_CTX +
          (process.env.VUE_APP_ENV == "product"
            ? process.env.VUE_APP_BOOK_ID
            : "artAndDrama")
            : "mathBook")
      );
      // 测试试读30页
      // this.activeBook.tryPageCount = 10;
src/books/mathBook/view/components/chapter001.vue
@@ -575,9 +575,9 @@
        </div>
      </div>
    </div>
    <!-- <div class="page-box padding-116" page="10">
    <div class="page-box padding-116" page="10">
      <drag :question="dragQuestion" :page="10"/>
    </div> -->
    </div>
    <!-- 函数控件弹窗 -->
    <el-dialog
      :visible.sync="dialogVisible"
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>
                <!-- 正确错误图标 -->
                <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%;
}