InputNumber precision为0时,onChange输出错误的值
Sunny-117 opened this issue · comments
Sunny Fu commented
这里提到的bug:ant-design/ant-design#40733
原因在于input-number组件
Sunny Fu commented
想知道1.55.55 是按照合法数字还是非法数字来处理,以方便来提pr
Amumu commented
非法的, 表象上看是按第一个小数点截断
Sunny Fu commented
直接限制不让他输入第二个.是不是更优雅一些
Amumu commented
是个路子, 来个PR试试?
Amumu commented
但是, 好像有些国家是用点来表示千分位(没细看实现是否有考虑千分位符号输入) ,没有就忽略我.
Sunny Fu commented
element plus 是这样做的,直接限制输入,我来提吧
Sunny Fu commented
element plus 的效果是正确的,一顿排查,最终ep也没有自己做,原来原生html的input设置type:number就会默认支持这种情况