Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

框架bug-InputNumber组件使用setFieldsValue设置值后,返回的值会变成string类型 #3526

Closed
boblk570 opened this issue Jan 9, 2024 · 8 comments

Comments

@boblk570
Copy link

boblk570 commented Jan 9, 2024

框架bug-InputNumber组件使用setFieldsValue设置值后,返回的值会变成string类型

@boblk570
Copy link
Author

boblk570 commented Jan 9, 2024

/Users/admin/Documents/Clients/star/admin/src/components/Form/src/helper.ts
export const defaultValueComponents = [
'Input',
'InputPassword',
'InputNumber',
'InputSearch',
'InputTextArea',
];

@xachary
Copy link

xachary commented Jan 10, 2024

@boblk570
从这里 #3288 开始,InputNumber 被加进去了

@xachary
Copy link

xachary commented Jan 10, 2024

我直接移除 handleInputNumberValue 的使用了,输入输出类型不一致,更多例如接口返回类型就是不对的。

@crudboy
Copy link

crudboy commented Jan 11, 2024

这个会导致问题导致InputNumber 显示了数字但是 校验会失败 我移除handleInputNumberValue 就可以正常使用了

@wwavelet
Copy link

我直接移除 handleInputNumberValue 的使用了,输入输出类型不一致,更多例如接口返回类型就是不对的。

@xachary 请问下移除是直接把这行代码注释掉吗?
value = handleInputNumberValue(schema?.component, value);

@pylist
Copy link

pylist commented Feb 5, 2024

同样这个bug, 怎么解决

@anncwb
Copy link
Collaborator

anncwb commented Apr 9, 2024

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days

@anncwb anncwb added the Stale label Apr 9, 2024
@anncwb anncwb closed this as completed Apr 17, 2024
@goodsxx
Copy link

goodsxx commented Apr 29, 2024

我已提交了一个修复#3802

@vbenjs vbenjs locked and limited conversation to collaborators Aug 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants