Browse Source

docs: update docs (#42425)

pull/42429/head
kiner-tang(文辉) 2 years ago
committed by GitHub
parent
commit
291dc41850
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      components/input/index.en-US.md
  2. 2
      components/input/index.zh-CN.md

2
components/input/index.en-US.md

@ -67,7 +67,7 @@ A basic widget for getting the user input is a text field. Keyboard and mouse ca
| onChange | Callback when user input | function(e) | - | |
| onPressEnter | The callback function that is triggered when Enter key is pressed | function(e) | - | |
> When `Input` is used in a `Form.Item` context, if the `Form.Item` has the `id` and `options` props defined then `value`, `defaultValue`, and `id` props of `Input` are automatically set.
> When `Input` is used in a `Form.Item` context, if the `Form.Item` has the `id` props defined then `value`, `defaultValue`, and `id` props of `Input` are automatically set.
The rest of the props of Input are exactly the same as the original [input](https://reactjs.org/docs/dom-elements.html#all-supported-html-attributes).

2
components/input/index.zh-CN.md

@ -68,7 +68,7 @@ demo:
| onChange | 输入框内容变化时的回调 | function(e) | - | |
| onPressEnter | 按下回车的回调 | function(e) | - | |
> 如果 `Input``Form.Item` 内,并且 `Form.Item` 设置了 `id` `options` 属性,则 `value` `defaultValue``id` 属性会被自动设置。
> 如果 `Input``Form.Item` 内,并且 `Form.Item` 设置了 `id` 属性,则 `value` `defaultValue``id` 属性会被自动设置。
Input 的其他属性和 React 自带的 [input](https://reactjs.org/docs/dom-elements.html#all-supported-html-attributes) 一致。

Loading…
Cancel
Save