|
|
@@ -117,7 +117,7 @@
|
|
|
<van-field
|
|
|
v-for="(item, index) in popList[questionsIndex].options"
|
|
|
:key="'tian'+index"
|
|
|
- v-model="item.answer"
|
|
|
+ v-model.trim="item.answer"
|
|
|
placeholder="请输入内容"
|
|
|
:border="true"
|
|
|
clearable
|
|
|
@@ -129,7 +129,7 @@
|
|
|
<!-- 简答题 -->
|
|
|
<div v-if="popList[questionsIndex]&&popList[questionsIndex].questionType=='简答题'">
|
|
|
<van-field
|
|
|
- v-model="popListAnswer[questionsIndex]"
|
|
|
+ v-model.trim="popListAnswer[questionsIndex]"
|
|
|
placeholder="请输入内容"
|
|
|
type="textarea"
|
|
|
:border="true"
|
|
|
@@ -587,8 +587,8 @@ export default {
|
|
|
|
|
|
},
|
|
|
fieleInput(val, qIndex, aIndex) {
|
|
|
+ val = val.replace(/^\s+|s+$/g, '')
|
|
|
if (this.popList[qIndex].questionType === '填空题' && val !== '') {
|
|
|
- // this.popListAnswer[qIndex][aIndex] = val
|
|
|
this.$set(this.popListAnswer[qIndex], aIndex, val)
|
|
|
}
|
|
|
},
|