Browse Source
fix(BasicForm): 修复 SetFieldsValue 设置值时,会将 Number 类型的值转为 string (#3802)
pull/3806/head
Song XinXin
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
1 additions and
1 deletions
-
src/components/Form/src/helper.ts
|
|
|
@ -72,7 +72,7 @@ export const defaultValueComponents = [ |
|
|
|
export function handleInputNumberValue(component?: ComponentType, val?: any) { |
|
|
|
if (!component) return val; |
|
|
|
if (defaultValueComponents.includes(component)) { |
|
|
|
return val && isNumber(val) ? `${val}` : val; |
|
|
|
return val && isNumber(val) ? val : `${val}`; |
|
|
|
} |
|
|
|
return val; |
|
|
|
} |
|
|
|
|