mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-23 23:18:36 +08:00
12 lines
587 B
Markdown
12 lines
587 B
Markdown
## zh-CN
|
||
|
||
通过 `Form.useForm` 对表单数据域进行交互。
|
||
|
||
> 注意 `useForm` 是 [React Hooks](https://reactjs.org/docs/hooks-intro.html) 的实现,只能用于函数组件。如果是在 Class Component 下,你也可以通过 `ref` 获取数据域:https://codesandbox.io/p/sandbox/ngtjtm
|
||
|
||
## en-US
|
||
|
||
Call form method with `Form.useForm`.
|
||
|
||
> Note that `useForm` is a [React Hooks](https://reactjs.org/docs/hooks-intro.html) that only works in functional component. You can also use `ref` to get the form instance in class component: https://codesandbox.io/p/sandbox-ngtjtm
|