增加耗材分类名称禁止输入空格

This commit is contained in:
YeMingfei666 2024-07-22 13:49:33 +08:00
parent aaea042bca
commit 30b309dcf3
1 changed files with 5 additions and 1 deletions

View File

@ -77,7 +77,7 @@
<el-dialog :title="dialogtitle" :visible.sync="dialogshow">
<el-form ref="refruleForm" :model="ruleForm" :rules="rules">
<el-form-item label="耗材类型名称" prop="conTypeName">
<el-input v-model="ruleForm.conTypeName" />
<el-input v-model="ruleForm.conTypeName" @input="trimInput($event,'conTypeName')"/>
</el-form-item>
<!-- <el-form-item label="耗材类型代码" prop="conTypeCode">
<el-input v-model="ruleForm.conTypeCode" />
@ -153,6 +153,10 @@ export default {
})
},
methods: {
trimInput(val,key){
console.log(val)
this.ruleForm[key] = val.replace(/\s+/g, '')
},
//
tableDrag() {
const el = document.querySelector('#table_drag .el-table__body-wrapper tbody')