fix(BasicForm): 修复 SetFieldsValue 设置值时,会将 Number 类型的值转为 string (#3802)
This commit is contained in:
parent
06018add79
commit
08a1f7b682
|
|
@ -72,7 +72,7 @@ export const defaultValueComponents = [
|
||||||
export function handleInputNumberValue(component?: ComponentType, val?: any) {
|
export function handleInputNumberValue(component?: ComponentType, val?: any) {
|
||||||
if (!component) return val;
|
if (!component) return val;
|
||||||
if (defaultValueComponents.includes(component)) {
|
if (defaultValueComponents.includes(component)) {
|
||||||
return val && isNumber(val) ? `${val}` : val;
|
return val && isNumber(val) ? val : `${val}`;
|
||||||
}
|
}
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue