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

useForm中的rules中某一个required为computed的时候,验证规则会生效,但是form-item的label前面的*号不会显示或隐藏 #4799

Closed
1 task
JobinJia opened this issue Oct 23, 2021 · 2 comments
Labels

Comments

@JobinJia
Copy link
Contributor

JobinJia commented Oct 23, 2021

  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

3.0.0-alpha.4

Environment

mac Os catalina 10.15.4/ chrome 84.0.4147.125 (正式版本) (64 位)/ vue 3.2.20

Reproduction link

Edit on CodeSandbox

Steps to reproduce

Demo中
当表单中 Activity name 的值不为 'a' 时,Activity zone 为必填, 否则,Activity zone为非必填

What is expected?

form-item 的label前的必填符号(*) 应该正确的显示或隐藏

What is actually happening?

form-item 的label前的必填符号(*) 没有正确的显示或隐藏

@github-actions github-actions bot changed the title useForm中的rules中某一个required为computed的时候,验证规则会生效,但是form-item的label前端的*号不是会显示或隐藏 When one of the required rules in the useForm is computed, the validation rules will take effect, but the * at the front end of the label of the form-item will not be displayed or hidden Oct 23, 2021
@JobinJia JobinJia changed the title When one of the required rules in the useForm is computed, the validation rules will take effect, but the * at the front end of the label of the form-item will not be displayed or hidden useForm中的rules中某一个required为computed的时候,验证规则会生效,但是form-item的label前面的*号不是会显示或隐藏 Oct 23, 2021
@JobinJia JobinJia changed the title useForm中的rules中某一个required为computed的时候,验证规则会生效,但是form-item的label前面的*号不是会显示或隐藏 useForm中的rules中某一个required为computed的时候,验证规则会生效,但是form-item的label前面的*号不会显示或隐藏 Oct 23, 2021
@JobinJia
Copy link
Contributor Author

20211024_042228.mp4
20211024_042331.mp4

fork 代码改了一份,能实现其效果。但只支持required 是ref的情况。如果rules其它字段也要支持ref ,改动量略微有些大。
这个功能是否需要?如果需要我可以偿试修改并提个PR

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant