| | |
| | | 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"> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { Message } from 'element-ui'; |
| | | export default { |
| | | name: "examination-option", |
| | | props: { |
| | |
| | | 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; |
| | |
| | | } |
| | | }, |
| | | // 保存按钮 |
| | | 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( |
| | |
| | | this.config.activeBook.name + "oldAnswerData", |
| | | JSON.stringify(oldData) |
| | | ); |
| | | Message.success('保存成功') |
| | | } |
| | | |
| | | // if(oldData[this.chapter]) { |
| | |
| | | |
| | | <style lang="less" scoped> |
| | | .catalogName { |
| | | // color: #00aeef; |
| | | // color: #ff6c00; |
| | | text-indent: 1em !important; |
| | | font-size: 16px; |
| | | } |
| | |
| | | } |
| | | .collect-png { |
| | | cursor: pointer; |
| | | width: 25px; |
| | | width: 18px; |
| | | object-fit: contain; |
| | | } |
| | | </style> |