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

InputNumber 提供一个属性,当 precision 不为 0 时,通过 value 设置值或 onBlur 时自动清空末尾的 0 #47970

Closed
linxianxi opened this issue Mar 20, 2024 · 2 comments

Comments

@linxianxi
Copy link
Contributor

What problem does this feature solve?

当 precision 为 2 时

问题:输入 1,失焦时会变成 1.00,不是很美观。

期望:输入 1,变成 1
输入 1.1,变成 1.1
输入 1.11,变成 1.11

What does the proposed API look like?

clearTrailingZero

@zombieJ
Copy link
Member

zombieJ commented Mar 20, 2024

formatter 转译即可,precision 本身其实是 formatter 的语法糖实现。

@zombieJ zombieJ closed this as completed Mar 20, 2024
@linxianxi
Copy link
Contributor Author

这样比较麻烦,需要写逻辑

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants