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时,onChange输出错误的值 #539

Open
Sunny-117 opened this issue Feb 15, 2023 · 7 comments
Open

InputNumber precision为0时,onChange输出错误的值 #539

Sunny-117 opened this issue Feb 15, 2023 · 7 comments

Comments

@Sunny-117
Copy link

这里提到的bug:ant-design/ant-design#40733
原因在于input-number组件

@Sunny-117
Copy link
Author

想知道1.55.55 是按照合法数字还是非法数字来处理,以方便来提pr

@yoyo837
Copy link
Member

yoyo837 commented Feb 15, 2023

非法的, 表象上看是按第一个小数点截断

@Sunny-117
Copy link
Author

直接限制不让他输入第二个.是不是更优雅一些

@yoyo837
Copy link
Member

yoyo837 commented Feb 15, 2023

是个路子, 来个PR试试?

@yoyo837
Copy link
Member

yoyo837 commented Feb 15, 2023

但是, 好像有些国家是用点来表示千分位(没细看实现是否有考虑千分位符号输入) ,没有就忽略我.

@Sunny-117
Copy link
Author

element plus 是这样做的,直接限制输入,我来提吧

@Sunny-117
Copy link
Author

element plus 的效果是正确的,一顿排查,最终ep也没有自己做,原来原生html的input设置type:number就会默认支持这种情况

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

2 participants