unknown
2024-06-17 304689614daa96595aeeeed8e46e5dfa992ef2df
src/components/examinations/index.vue
@@ -73,12 +73,13 @@
                    v-html="itemText"
                  ></span>
                  <!-- &nbsp; -->
                  <el-input
                  <input
                    v-else
                    type="text"
                    class="input"
                    v-model.trim="value.userAnswer[itemText.num]"
                    :disabled="value.isComplete"
                    :style="{backgroundColor:inputBc}"
                  />
                  <!-- &nbsp; -->
                </span>
@@ -91,7 +92,7 @@
                v-cloak
              ></p>
            </div>
            <img :src="value.isCollect ? isCollect : collect" alt="" class="collect-png" @click="handleCollect(nindex,index)" >
            <img :src="value.isCollect ? isHeart : heart" alt="" class="collect-png" @click="handleCollect(nindex,index)" >
            <!-- 收藏 -->
          </div>
          <div class="questionContent">
@@ -474,6 +475,7 @@
</template>
<script>
import { Message } from 'element-ui';
export default {
  name: "examination-option",
  props: {
@@ -494,6 +496,10 @@
      type: Boolean,
      default: true,
    },
    inputBc: {
      type: String,
      default: "#fff",
    },
  },
  data() {
    return {
@@ -501,14 +507,13 @@
      loading: false,
      cardData: [],
      loading: true,
      collect:require("@/assets/images/collect.png"),
      isCollect:require("@/assets/images/isCollect.png")
      heart:require("@/assets/images/heart.png"),
      isHeart:require("@/assets/images/heart-check.png"),
    };
  },
  watch: {
    cardList: {
      handler(newVal) {
        console.log("11", newVal);
        this.cardData = this.cardList;
        if (newVal && newVal.length) {
          this.loading = false;
@@ -638,13 +643,10 @@
      }
    },
    // 保存按钮
    saveAnswer() {
      const element = (
        this.container ? this.container : document
      ).querySelector(".examination");
      if (element) {
    saveAnswer(e) {
      if (e.srcElement) {
        const pageNum = this.getParentWithClass(
          element,
          e.srcElement,
          "page-box"
        ).getAttribute("page");
        const oldAnswerData = localStorage.getItem(
@@ -675,6 +677,7 @@
          this.config.activeBook.name + "oldAnswerData",
          JSON.stringify(oldData)
        );
        Message.success('保存成功')
      }
      // if(oldData[this.chapter]) {
@@ -695,8 +698,6 @@
<style lang="less" scoped>
.catalogName {
  // color: #00aeef;
  // color: #ff6c00;
  text-indent: 1em !important;
  font-size: 16px;
}
@@ -828,23 +829,15 @@
        font-weight: 400;
        margin-top: 6px;
      }
      .el-input {
      input {
        width: 140px;
        height: 24px;
        border-top: 0;
        border: 0;
        outline: none;
        border-bottom: 1px solid #15c0f2;
      }
      /deep/ .el-textarea.is-disabled .el-textarea__inner {
        background-color: #fff;
      }
      /deep/.el-input__wrapper {
        border-top: 0 !important;
      }
      /deep/ .el-input__inner {
        border-top: 0 !important;
        border-left: 0 !important ;
        border-right: 0 !important ;
        border-bottom: 1px solid #15c0f2 !important;
        border-radius: 0 !important;
      }
      /deep/ .el-input.is-disabled .el-input__inner {
        background-color: #fff;
@@ -1213,7 +1206,7 @@
}
.collect-png {
  cursor: pointer;
  width: 25px;
  width: 18px;
  object-fit: contain;
}
</style>