mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-01 11:39:28 +08:00
update doc
This commit is contained in:
parent
d1e58d058f
commit
b54157a395
@ -11,8 +11,8 @@ title:
|
||||
> * 提供受控属性 `value` 或其它与 [`valuePropName`](http://ant.design/components/form/#getFieldDecorator-参数) 的值同名的属性。
|
||||
> * 提供 `onChange` 事件或 [`trigger`](http://ant.design/components/form/#getFieldDecorator-参数) 的值同名的事件。
|
||||
> * 支持 ref:
|
||||
> * React@16.8.0 之前只有 Class 组件支持。
|
||||
> * React@16.8.0 及之后可以通过 [useImperativeHandle](https://reactjs.org/docs/hooks-reference.html#useimperativehandle) 添加 ref 支持。([示例](https://codesandbox.io/s/31mv8004rp))
|
||||
> * React@16.3.0 之前只有 Class 组件支持。
|
||||
> * React@16.3.0 及之后可以通过 [forwardRef](https://reactjs.org/docs/forwarding-refs.html) 添加 ref 支持。([示例](https://codesandbox.io/s/7wj199900x))
|
||||
|
||||
## en-US
|
||||
|
||||
@ -20,8 +20,8 @@ Customized or third-party form controls can be used in Form, too. Controls must
|
||||
> * It has a controlled property `value` or other name which is equal to the value of [`valuePropName`](http://ant.design/components/form/?locale=en-US#getFieldDecorator's-parameters).
|
||||
> * It has event `onChange` or an event which name is equal to the value of [`trigger`](http://ant.design/components/form/?locale=en-US#getFieldDecorator's-parameters).
|
||||
> * Support ref:
|
||||
> * Can only use class component before React@16.8.0.
|
||||
> * Can use [useImperativeHandle](https://reactjs.org/docs/hooks-reference.html#useimperativehandle) to add ref support after React@16.8.0. ([Sample](https://codesandbox.io/s/31mv8004rp))
|
||||
> * Can only use class component before React@16.3.0.
|
||||
> * Can use [forwardRef](https://reactjs.org/docs/forwarding-refs.html) to add ref support after React@16.3.0. ([Sample](https://codesandbox.io/s/7wj199900x))
|
||||
|
||||
````jsx
|
||||
import {
|
||||
|
Loading…
Reference in New Issue
Block a user