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

输入以0结尾的数字时不会触发on-update:value事件 #2115

Closed
cjx-2435 opened this issue Jan 5, 2022 · 4 comments · Fixed by #2117
Closed

输入以0结尾的数字时不会触发on-update:value事件 #2115

cjx-2435 opened this issue Jan 5, 2022 · 4 comments · Fixed by #2117
Labels
untriaged need to sort

Comments

@cjx-2435
Copy link

cjx-2435 commented Jan 5, 2022

TuSimple/naive-ui version (版本)

2.23.2

Vue version (Vue 版本)

3.0.0

Browser and its version (浏览器及其版本)

Chrome/96.0.4664.110

System and its version (系统及其版本)

Windows NT 10.0

Node version (Node 版本)

Reappearance link (重现链接)

https://www.naiveui.com/zh-CN/os-theme/components/input-number

Reappearance steps (重现步骤)

官方文档 数字输入 Input Number 演示-事件 在输入框中输入 1 时 显示吐司 update:value(1)
再输入 0 时 不会弹出吐司 直到输入非 0 数字 才会 弹出吐司 update:value(xx)

Expected results (期望的结果)

在输入 0 时正常触发事件update:value

Actual results (实际的结果)

在输入以0结尾的数字时不会触发update:value事件

Remarks (补充说明)

@github-actions github-actions bot added the untriaged need to sort label Jan 5, 2022
@Talljack
Copy link
Contributor

Talljack commented Jan 5, 2022

目前来看这是合理的,因为如果你输入0那么update:value的时候会进行Number转换, 0也不会更新上

@cjx-2435
Copy link
Author

cjx-2435 commented Jan 5, 2022

在输入1之后再输入0 结果为10
值是明显发生改变了的,但是没自动更新
只有失去焦点后才会触发更新,感觉不是很合理

@Talljack
Copy link
Contributor

Talljack commented Jan 5, 2022

在输入1之后再输入0 结果为10 值是明显发生改变了的,但是没自动更新 只有失去焦点后才会触发更新,感觉不是很合理

没考虑的的情况,我们会修改

@cjx-2435
Copy link
Author

cjx-2435 commented Jan 5, 2022

好的 辛苦了

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

Successfully merging a pull request may close this issue.

2 participants