|
@@ -24,7 +24,7 @@
|
|
|
{{ col.con }}
|
|
|
</template>
|
|
|
<template v-else>
|
|
|
- <div v-html="curQue.Bookanswer[rowIndex][colIndex]" contenteditable="true" placeholder="输入" class="input" @input="handleMaxlength" ></div>
|
|
|
+ <div v-html="curQue.Bookanswer.curCorrect[rowIndex][colIndex]" contenteditable="true" placeholder="输入" class="input" @input="handleMaxlength" ></div>
|
|
|
<!-- <input type="text" v-model="col.con" /> -->
|
|
|
</template>
|
|
|
</td>
|
|
@@ -58,7 +58,7 @@ export default {
|
|
|
components: {
|
|
|
Soundrecord,
|
|
|
},
|
|
|
- props: ["curQue","Bookanswer"],
|
|
|
+ props: ["curQue"],
|
|
|
data() {
|
|
|
//这里存放数据
|
|
|
return {};
|
|
@@ -69,7 +69,10 @@ export default {
|
|
|
watch: {},
|
|
|
//方法集合
|
|
|
methods: {
|
|
|
- handleWav(data) {},
|
|
|
+ handleWav(list, tmIndex) {
|
|
|
+ tmIndex = tmIndex ? tmIndex : 0;
|
|
|
+ this.$set(this.curQue.Bookanswer, "recordList", list);
|
|
|
+ },
|
|
|
handleMaxlength(e){
|
|
|
if(e.target.innerHTML.length>200){
|
|
|
e.target.innerHTML = e.target.innerHTML.substring(0, 200);
|
|
@@ -92,10 +95,11 @@ export default {
|
|
|
})
|
|
|
curCorrect.push(curCorrectItem)
|
|
|
});
|
|
|
- this.$set(this.curQue, "Bookanswer", curCorrect);
|
|
|
- } else {
|
|
|
- let curCorrect = JSON.parse(JSON.stringify(this.Bookanswer));
|
|
|
- this.$set(this.curQue, "Bookanswer", curCorrect);
|
|
|
+ let bookanswer = {
|
|
|
+ curCorrect : curCorrect,
|
|
|
+ recordList: [],
|
|
|
+ }
|
|
|
+ this.$set(this.curQue, "Bookanswer", bookanswer);
|
|
|
}
|
|
|
},
|
|
|
//生命周期 - 挂载完成(可以访问DOM元素)
|