We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
NumberPicker
重现步骤: 组件: 操作流程:使用增加按钮和减少按钮时,没有输出预期结果 原因:hackChrome 少了 precision 为0 的条件 输出结果 -2.99 -4.99 预期结果 -2 -4
The text was updated successfully, but these errors were encountered:
这是您为 Fusion/Next 提的第一个 issue,感谢您对 Fusion 的信任和支持,我们会尽快进行处理。
Sorry, something went wrong.
fix(NumberPicker): The hackChrome function lacks the processing of th…
09ffa29
…e condition where precision is 0 alibaba-fusion#4998
fix(NumberPicker): The hackChrome function lacks the conditional proc…
9469cb3
…essing for precision being 0 alibaba-fusion#4998
你的具体使用场景是什么?
有两个NumberPicker组件,一个为数据项,一个为小数位,在修改小数位后,数据项在点击减少或增加按钮时,能够显示保留小数位的数字
这个问题的解决方案从设计合理性来看,不应该在触发upStep 或者 downStep的时候对数据进行处理,而是应该在 precision 发生变化的时候,就将数据处理成规范的数据,针对你现在这个情况,如果是受控模式下,可以在改变 precision 时,将对应的value值改成正确的数值,如果是非受控模式下,可以在改变 precision 时,将defaultValue的处理成正确的数字,然后通过 组建 key值的改变,来触发react的重新初始化渲染从而达到预期效果。
No branches or pull requests
Component
NumberPicker
Steps to reproduce
重现步骤:
组件:
操作流程:使用增加按钮和减少按钮时,没有输出预期结果
原因:hackChrome 少了 precision 为0 的条件
输出结果 -2.99 -4.99
预期结果 -2 -4
The text was updated successfully, but these errors were encountered: