Skip to content

Commit

Permalink
fix(BasicForm): 修复 SetFieldsValue 设置值时,会将 Number 类型的值转为 string (#3802)
Browse files Browse the repository at this point in the history
  • Loading branch information
goodsxx authored Apr 29, 2024
1 parent 06018ad commit 08a1f7b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/Form/src/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 08a1f7b

Please sign in to comment.