提交 80eb10b1 authored 作者: 王鹏飞's avatar 王鹏飞

fix: eslint error

上级 f1dd8918
...@@ -186,24 +186,24 @@ export default { ...@@ -186,24 +186,24 @@ export default {
// 案例题下面的问答题 // 案例题下面的问答题
QAChildChange(pId, item, length) { QAChildChange(pId, item, length) {
// if (length.length < 500) { // if (length.length < 500) {
if (this.questionParams.answerRecord[pId]) { if (this.questionParams.answerRecord[pId]) {
if (this.questionParams.answerRecord[pId][item.id]) { if (this.questionParams.answerRecord[pId][item.id]) {
this.questionParams.answerRecord[pId][item.id].answer = [item.answer] this.questionParams.answerRecord[pId][item.id].answer = [item.answer]
} else {
this.questionParams.answerRecord[pId][item.id] = {
answer: [item.answer],
sign: false
}
}
} else { } else {
this.questionParams.answerRecord[pId] = { this.questionParams.answerRecord[pId][item.id] = {
[item.id]: { answer: [item.answer],
answer: [item.answer], sign: false
sign: false
}
} }
} }
this.$forceUpdate() } else {
this.questionParams.answerRecord[pId] = {
[item.id]: {
answer: [item.answer],
sign: false
}
}
}
this.$forceUpdate()
// } else { // } else {
// this.$message({ // this.$message({
// message: '最多输入500个字符', // message: '最多输入500个字符',
...@@ -214,20 +214,20 @@ export default { ...@@ -214,20 +214,20 @@ export default {
// 问答题回答 // 问答题回答
QAChange(pId, cId, length) { QAChange(pId, cId, length) {
// if (length.length < 500) { // if (length.length < 500) {
this.questionParams.answerRecord[pId] this.questionParams.answerRecord[pId]
? this.questionParams.answerRecord[pId][cId] ? this.questionParams.answerRecord[pId][cId]
? this.questionParams.answerRecord[pId][cId].answer = [this.questionData.textContent] ? this.questionParams.answerRecord[pId][cId].answer = [this.questionData.textContent]
: this.questionParams.answerRecord[pId][cId] = { : this.questionParams.answerRecord[pId][cId] = {
answer: [this.questionData.textContent], answer: [this.questionData.textContent],
sign: false sign: false
}
: this.questionParams.answerRecord[pId] = {
[cId]: {
answer: [this.questionData.textContent],
sign: false
}
} }
this.$forceUpdate() : this.questionParams.answerRecord[pId] = {
[cId]: {
answer: [this.questionData.textContent],
sign: false
}
}
this.$forceUpdate()
// } else { // } else {
// this.$message({ // this.$message({
// message: '最多输入500个字符', // message: '最多输入500个字符',
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论