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

n-form表单错误信息动画优化 #5583

Closed
5 tasks done
liub1934 opened this issue Jan 11, 2024 · 3 comments
Closed
5 tasks done

n-form表单错误信息动画优化 #5583

liub1934 opened this issue Jan 11, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@liub1934
Copy link

Describe the bug

当form表单的rule设置了多个trigger,比如trigger: ['input', 'blur'],此时input会触发错误信息,blur也会触发错误信息,错误出现会有动画效果,导致页面错误信息展示再闪一次出现。
demo14

Steps to reproduce

1、打开官网示例:https://www.naiveui.com/zh-CN/os-theme/components/form
2、在年龄输入框中输入任意值并点击其他地方让输入框失去焦点
3、再次点击输入框,将内容删除,此时会出现必填的校验报错,再点击其他地方让输入框失去焦点,此时会再次出现必填项的错误校验信息

Link to minimal reproduction

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

System Info

macos 13.5.2 (22G91)
chrome 120.0.6099.199
"naive-ui": "^2.37.3"
"vue": "^3.4.7"

Used Package Manager

npm

Validations

@jizai1125
Copy link
Contributor

jizai1125 commented Jan 21, 2024

这不是 bug 吧,校验两次的原因是因为 trigger 设成了 input, blur

@07akioni
Copy link
Collaborator

这不是 bug 吧,校验两次的原因是因为 trigger 设成了 input, blur

或许如果能认出来 feedback 没有变的情况可以保持原有内容不变?

@07akioni 07akioni added consideration-needed bug Something isn't working and removed untriaged need to sort consideration-needed labels Jan 23, 2024
@07akioni
Copy link
Collaborator

This is actually a bug introduced in 2.37.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants