<el-input v-model="form.reason" type="textarea" placeholder="请输入理由"/>
this.form.reason.split(' ').join('').length === 0
this.form.reason.split(' ').join('').length === 0的意思是先以空格拆分成数组,再拼接起来,最后判断字符串的长度,如果长度为0证明输入的全是空格
<el-input v-model="form.reason" type="textarea" placeholder="请输入理由"/>
this.form.reason.split(' ').join('').length === 0
this.form.reason.split(' ').join('').length === 0的意思是先以空格拆分成数组,再拼接起来,最后判断字符串的长度,如果长度为0证明输入的全是空格