ZhangZhiChao
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
6 additions and
1 deletions
-
src/components/Form/src/hooks/useFormValues.ts
|
|
|
@ -76,7 +76,12 @@ export function useFormValues({ |
|
|
|
} |
|
|
|
// Remove spaces
|
|
|
|
if (isString(value)) { |
|
|
|
value = value.trim(); |
|
|
|
// remove params from URL
|
|
|
|
if(value === '') { |
|
|
|
value = undefined; |
|
|
|
}else { |
|
|
|
value = value.trim(); |
|
|
|
} |
|
|
|
} |
|
|
|
if (!tryDeconstructArray(key, value, res) && !tryDeconstructObject(key, value, res)) { |
|
|
|
// 没有解构成功的,按原样赋值
|
|
|
|
|