| | |
| | | class="question-box" |
| | | > |
| | | <!-- 题干 --> |
| | | <div> |
| | | <div class="stem"> |
| | | <span v-for="(ditem, dindex) in item.stem" :key="dindex"> |
| | | <span v-if="typeof ditem == 'string'"> |
| | | {{ ditem }} |
| | |
| | | /> |
| | | </p> |
| | | <!-- 正确错误图标 --> |
| | | <span class="mr-10"> |
| | | <span class="mr-10 judge-icon"> |
| | | <svg |
| | | v-if="item.isRight" |
| | | t="1716986419862" |
| | |
| | | maxX: null, |
| | | maxY: null, |
| | | spaceList: [], |
| | | submitState:false, |
| | | }; |
| | | }, |
| | | mounted() { |
| | |
| | | // 3.限制鼠标松开要在空格的范围内 |
| | | mousedown(e) { |
| | | e.preventDefault(); |
| | | if(this.submitState) return false |
| | | console.log("鼠标按下", e); |
| | | this.moveDom = e.toElement; |
| | | this.parentDom = this.getParentWithClass(e.toElement, "question-box"); |
| | |
| | | }, |
| | | // 提交 |
| | | submitData() { |
| | | this.submitState = true |
| | | let arr = []; |
| | | const data = this.drageQuestion; |
| | | for (let index = 0; index < data.length; index++) { |
| | |
| | | arr[cindex] = citem.value |
| | | } |
| | | item.isRight = arr == item.answer |
| | | item.isComplete = true |
| | | } |
| | | |
| | | console.log(arr,this.drageQuestion[0]); |
| | | }, |
| | | redio() { |
| | | this.submitState = false |
| | | localStorage.removeItem( |
| | | this.config.activeBook.name + "-drag-" + this.page |
| | | ); |
| | |
| | | // 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( |
| | |
| | | .drag-option { |
| | | cursor: pointer; |
| | | } |
| | | .stem { |
| | | line-height: 2em; |
| | | } |
| | | .drag-bottom-btn { |
| | | width: 100%; |
| | | display: flex; |
| | |
| | | width: 94%; |
| | | // margin-left: 12px; |
| | | } |
| | | .judge-icon { |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | .el-collapse { |
| | | width: 100%; |
| | | } |