-
-
Notifications
You must be signed in to change notification settings - Fork 50.8k
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
feat: validateFirst support parallel #25321
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 87509c8:
|
Codecov Report
@@ Coverage Diff @@
## feature #25321 +/- ##
========================================
Coverage 99.51% 99.51%
========================================
Files 368 368
Lines 7290 7290
Branches 1995 2044 +49
========================================
Hits 7255 7255
Misses 35 35 Continue to review full report at Codecov.
|
Co-authored-by: xrkffgg <xrkffgg@gmail.com>
Co-authored-by: xrkffgg <xrkffgg@gmail.com>
@@ -93,7 +93,7 @@ const validateMessages = { | |||
| rules | 校验规则,设置字段的校验逻辑。点击[此处](#components-form-demo-basic)查看示例 | [Rule](#Rule)[] | - | | | |||
| shouldUpdate | 自定义字段更新逻辑,说明[见下](#shouldUpdate) | boolean \| (prevValue, curValue) => boolean | false | | | |||
| trigger | 设置收集字段值变更的时机 | string | `onChange` | | | |||
| validateFirst | 当某一规则校验不通过时,是否停止剩下的规则的校验 | boolean | false | | | |||
| validateFirst | 当某一规则校验不通过时,是否停止剩下的规则的校验。设置 `parallel` 时会并行校验 | boolean \| `parallel` | false | `parallel`: 4.5.0 | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我咋理解这里是应该是串行?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
没有的。 boolean | parallel
展示的出的效果,表示类型是 boolean 或者 parallel
,默认值为 false ,其中 parallel
是 4.5.0 版本加的
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
markdown table 换行和代码格式是个大问题。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
那这算breaking change吧?原并行改为串行,支持开启并行。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
嗯,不过影响不大。设置 validateFirst
有一个报错就行了。
[中文版模板 / Chinese template]
🤔 This is a ...
🔗 Related issue link
resolve #21793
💡 Background and solution
📝 Changelog
validateFist
to validate in order. Origin logic useparallel
to validate.validateFirst
属性为依次执行校验,原并行逻辑改由配置parallel
开启。☑️ Self Check before Merge
View rendered components/form/index.en-US.md
View rendered components/form/index.zh-CN.md