This commit is contained in:
zhaofang
2022-07-08 13:53:37 +08:00
parent d513ecbef9
commit c30df0ac47
2 changed files with 3 additions and 2 deletions

View File

@@ -4,7 +4,7 @@
<el-form-item label="回答内容"> <el-form-item label="回答内容">
<el-input <el-input
type="textarea" type="textarea"
v-model.trim="editData.content" v-model="editData.content"
placeholder="请输入详细描述" placeholder="请输入详细描述"
rows="8" rows="8"
minlength="1" minlength="1"
@@ -45,6 +45,7 @@
type: 'warning' type: 'warning'
}); });
} }
this.editData.content = this.editData.content.trim();
// if(this.editData.content.length<0||this.editData.content.length>255){ // if(this.editData.content.length<0||this.editData.content.length>255){
// return this.$message({ // return this.$message({
// message: '回复内容为0-800个字', // message: '回复内容为0-800个字',

View File

@@ -252,7 +252,7 @@ export default {
apiQa apiQa
.saveAnswer({ .saveAnswer({
qid: this.answer.id, qid: this.answer.id,
content: this.answer.inputValue content: this.answer.inputValue.trim()
}) })
.then(res => { .then(res => {
if (res.status == 200) { if (res.status == 200) {