fix: 租户表单提交前去除字符串字段首尾空格
Made-with: Cursor
This commit is contained in:
parent
7a8d909df3
commit
f7f97c64e4
@ -571,8 +571,19 @@ const handleDelete = (record: Tenant) => {
|
||||
})
|
||||
}
|
||||
|
||||
/** 提交前去除表单字符串字段首尾空格,再执行校验与保存 */
|
||||
const trimTenantFormStrings = () => {
|
||||
form.name = (form.name ?? '').trim()
|
||||
form.code = (form.code ?? '').trim()
|
||||
form.domain = (form.domain ?? '').trim()
|
||||
form.description = (form.description ?? '').trim()
|
||||
form.adminUsername = (form.adminUsername ?? '').trim()
|
||||
form.adminPassword = (form.adminPassword ?? '').trim()
|
||||
}
|
||||
|
||||
const handleSubmit = async () => {
|
||||
try {
|
||||
trimTenantFormStrings()
|
||||
await formRef.value?.validate()
|
||||
submitLoading.value = true
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user