| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { Message } from 'element-ui'; |
| | | export default { |
| | | name: "examination-option", |
| | | props: { |
| | |
| | | } |
| | | }, |
| | | // 保存按钮 |
| | | 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]) { |