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

Fit #326 #331

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Fit #326 #331

wants to merge 3 commits into from

Conversation

jearyt
Copy link

@jearyt jearyt commented Nov 3, 2023

修复InputNumber组件数据更新问题,问题来自#326
问题出现原因为InputNumber组件会在每次内容发生变化时实时更新值,并判断最大最小值等一系列情况,因此当用户想重新输入数据后,在输入第一位数字时值只能在0-9之间,如果最小值至少为10就会直接更新为最小值,从而导致后续的输入问题
结合过往网页使用体验并参考了其他组件库,发现绝大部分数字输入框的值更新会发生在其失焦时,这样可以使用户自由地输入所需内容,并在最后确定是否符合限定条件,不会在输入的过程中不断处理,保证了用户流畅的使用过程,同时避免了过高频率的检测限制了直接输入的内容,导致很多值只能通过逐渐加减来得到
本问题解决方法为将组件内检测值是否合法的过程由input以及change时会触发的change函数中移动至失焦时触发的blur函数中,即可得到常规的使用效果

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

Successfully merging this pull request may close these issues.

1 participant