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]ProFormDigit组件设置 precision=2, 输入多个小数点数值展示整数【升级版本解决,请忽略】 #8737

Open
wenshan opened this issue Sep 21, 2024 · 1 comment

Comments

@wenshan
Copy link

wenshan commented Sep 21, 2024

提问前先看看:

https://github.com/ryanhanwu/How-To-Ask-Questions-The-Smart-Way/blob/main/README-zh_CN.md

🐛 bug 描述

老项目升级,ProFormDigit组件设置 precision=2, 输入多个小数点的数值, 输入框内值变为整数。

🏞 期望结果

输入框内正常显示value值。

💻 复现代码

<ProForm.Group> <ProFormDigit fieldProps={{ precision: 2, addonAfter: 'USD'}} colProps={{ md: 12, xl: 8 }} name="exchange_US" label="美元汇率" /> <ProFormDigit fieldProps={{ precision: 2, addonAfter: 'JPY' }} colProps={{ md: 12, xl: 8 }} name="exchange_JP" label="日元汇率" /> <ProFormDigit fieldProps={{ precision: 2, addonAfter: 'KRW' }} colProps={{ md: 12, xl: 8 }} name="exchange_KR" label="韩元汇率" /> </ProForm.Group>

输入美元汇率 0.01时,展示 0.00
输入日元汇率20.50时,展示20.00

© 版本信息

  • ProComponents 版本: 2.3.1
  • umi 版本:4.1.2
  • 浏览器环境:chrome
  • 开发环境:mac OS]

🚑 其他信息

整错版本,升级后无此问题。

Copy link

以下的 Issues 可能会帮助到你 / The following issues may help you

@wenshan wenshan changed the title 🐛[BUG]ProFormDigit组件设置 precision=2, 输入多个小数点的数字字符串, 输入框内值变为整数, 但实际的value还是输入的带小数的数值 🐛[BUG]ProFormDigit组件设置 precision=2, 输入多个小数点数值展示整数【升级版本解决,请忽略】 Sep 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant