Skip to content
This repository was archived by the owner on Nov 26, 2021. It is now read-only.

Commit 8cd6b0f

Browse files
committed
add delay func
1 parent d9d143b commit 8cd6b0f

9 files changed

Lines changed: 179 additions & 84 deletions

File tree

README-zh_CN.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,12 +97,13 @@ export default formConnect(schemas, methods)(BasicForm);
9797
error: 'valid-error',
9898
}}
9999
values={this.state.formValues}
100+
delay={100}
100101
/>
101102
```
102103

103104

104105
* `values` 的值类似于 { email: '', hobby: ['2'] }
105-
* 这些参数也可以在 `BasicForm` 中使用 `init` 方法初始化
106+
* `classNames``values` 也可以在 `BasicForm` 中使用 `init` 方法初始化
106107

107108
基础验证方法可以参考 [validate-framework-utils](https://github.com/MinJieLiu/validate-framework-utils)
108109

@@ -147,6 +148,7 @@ return (
147148
| :--- | :--- | :--- | :--- | :--- |
148149
| values | Object | false | | `values` 集合 |
149150
| classNames | Object | false | {} | 其 key 值包含 `static``success``error` 三种类名 |
151+
| delay | number | false | | 验证防抖 |
150152

151153
#### Form params
152154

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,11 @@ Finally, sets the initialized value:
8787
error: 'valid-error',
8888
}}
8989
values={this.state.formValues}
90+
delay={100}
9091
/>
9192

9293
// The values like this { email: '', hobby: ['2'] }
93-
// These props can be initialized in `BasicForm` use `init`
94+
// classNames and values can be initialized in `BasicForm` use `init`
9495
```
9596

9697
Validate methods can refer to [validate-framework-utils](https://github.com/MinJieLiu/validate-framework-utils)
@@ -136,6 +137,7 @@ return (
136137
| :--- | :--- | :--- | :--- | :--- |
137138
| values | Object | false | | Key-value pairs for `name` and` value` |
138139
| classNames | Object | false | {} | Its `key` value contains` static`, `success`,` error` |
140+
| delay | number | false | | delay |
139141

140142
#### Form params
141143

lib/Field.js

Lines changed: 9 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/Field.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/FormControl.js

Lines changed: 108 additions & 58 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/FormControl.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-validate-framework",
3-
"version": "0.9.7",
3+
"version": "0.9.8",
44
"description": "React validation framework.",
55
"main": "lib/index.js",
66
"scripts": {
@@ -50,6 +50,7 @@
5050
},
5151
"homepage": "https://github.com/MinJieLiu/react-validate-framework#readme",
5252
"dependencies": {
53+
"lodash": "^4.17.4",
5354
"validate-framework-utils": "0.3.2"
5455
},
5556
"devDependencies": {

0 commit comments

Comments
 (0)