共计 757 个字符,预计需要花费 2 分钟才能阅读完成。
应用 blur 办法在失去焦点时进行 trim()
<el-form
ref="form"
:model="formData"
:rules="formRules"
style="width:80%;margin-top:20px;"
size="small"
label-width="100px"
>
<el-form-item label="以后节点" prop="moduleId">
<el-input
readonly
v-model="formData.moduleId"
@blur="formData.moduleId=$event.target.value.trim()"
></el-input>
</el-form-item>
<el-form-item label="帮忙 URL">
<el-input
placeholder="帮忙 URL"
@blur="formData.helpUrl=$event.target.value.trim()"
v-model="formData.helpUrl"></el-input>
</el-form-item>
<el-form-item label="模块形容">
<el-input
type="textarea"
placeholder="编辑模块形容..."
@blur="formData.moduleDesc=$event.target.value.trim()"
v-model="formData.moduleDesc"></el-input>
</el-form-item>
<el-form-item v-if="control.save">
<el-button type="primary" @click="save"> 保留 </el-button>
</el-form-item>
</el-form>
正文完