测试用例修改
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
<el-input v-model="form.code" placeholder="请输入部门编号"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item class="top" label="部门名称:" prop="name">
|
||||
<el-input v-model="form.name" placeholder="请输入部门名称"></el-input>
|
||||
<el-input v-model="form.name" placeholder="请输入部门名称" maxlength="32" show-word-limit clearable @input="handleInput"/>
|
||||
</el-form-item>
|
||||
<el-form-item class="top" label="部门类型:" prop="type">
|
||||
<el-select v-model="form.type" placeholder="选择部门类型" style="width: 100%">
|
||||
@@ -144,5 +144,14 @@ const submit = () => {
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
const handleInput = ( value: string) => {
|
||||
// 过滤空格
|
||||
const filteredValue = value.replace(/\s/g, '')
|
||||
if (filteredValue !== value) {
|
||||
form.name = filteredValue
|
||||
}
|
||||
}
|
||||
|
||||
defineExpose({ open })
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user