Closed cyue177 closed 2 years ago
首先,DripForm
除了自定义校验部分(onValidate)是手动控制的,ajv
校验(内置的关键字校验)都是实时校验的。validateTime
提供的配置只是用来展示错误和不展示错误。当validateTime
为change
时,错误信息会直接展示。为submit
或其他字段时,错误不会展示。
通过ref获取错误信息
由于提交时校验,有的用户不希望错误信息直接展示在表单下方,所以并没有强制展示,而是用户自己控制是否展示。 目前可以通过以下方法去设置提交之后展示错误信息
dispatch({
type:'setValidate',
action:{
set:{
validateTime:'change'
}
}
})
onValidate type为click时,按钮的disabled状态由当前表单的错误信息控制,有错误就会disabled。如果是异步校验,确实不合理。对于ajv校验是合理的
我理解如果是按钮置灰可以分几种情况:
文档完善问题,可在#65 中讨论希望完善的文档 DripForm在v0.8.0发布之后,会对文档进行重构并完善测试用例
form自带的footer按钮怎么使用?怎么配置按钮才会展示?
form自带的footer按钮怎么使用?怎么配置按钮才会展示?
可以在generator中全局有个底部按钮进行配置。
This issue has been automatically marked as no-issue-activity because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Have you read the Contributing Guidelines on issues?
Prerequisites
Description
Steps to reproduce
Current behavior
同上
Expected behavior
Your environment
Reproducible demo
No response
Self-service