docs: fix useWatch type error (#37013)

This commit is contained in:
ZhiHao Li 2022-08-12 18:06:26 +08:00 committed by GitHub
parent b63e49e9e8
commit 9c01aff437
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -315,7 +315,7 @@ export default () => {
### Form.useWatch
`type Form.useWatch = (namePath: NamePath, formInstance: FormInstance): Value`
`type Form.useWatch = (namePath: NamePath, formInstance?: FormInstance): Value`
Added in `4.20.0`. Watch the value of a field. You can use this to interactive with other hooks like `useSWR` to reduce develop cost:

View File

@ -314,7 +314,7 @@ export default () => {
### Form.useWatch
`type Form.useWatch = (namePath: NamePath, formInstance: FormInstance): Value`
`type Form.useWatch = (namePath: NamePath, formInstance?: FormInstance): Value`
`4.20.0` 新增,用于直接获取 form 中字段对应的值。通过该 Hooks 可以与诸如 `useSWR` 进行联动从而降低维护成本: