| | |
| | | v-html="itemText" |
| | | ></span> |
| | | <!-- --> |
| | | <el-input |
| | | <input |
| | | v-else |
| | | type="text" |
| | | class="input" |
| | | v-model.trim="value.userAnswer[itemText.num]" |
| | | :disabled="value.isComplete" |
| | | :style="{backgroundColor:inputBc}" |
| | | /> |
| | | <!-- --> |
| | | </span> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { Message } from 'element-ui'; |
| | | export default { |
| | | name: "examination-option", |
| | | props: { |
| | |
| | | isReal: { |
| | | type: Boolean, |
| | | default: true, |
| | | }, |
| | | inputBc: { |
| | | type: String, |
| | | default: "#fff", |
| | | }, |
| | | }, |
| | | data() { |
| | |
| | | } |
| | | }, |
| | | // 保存按钮 |
| | | 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]) { |
| | |
| | | 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; |