diff --git a/src/input/input.en-US.md b/src/input/input.en-US.md index a899282fc..89e29ccfb 100644 --- a/src/input/input.en-US.md +++ b/src/input/input.en-US.md @@ -7,7 +7,7 @@ name | type | default | description | required -- | -- | -- | -- | -- className | String | - | 类名 | N style | Object | - | 样式,Typescript:`React.CSSProperties` | N -align | String | left | options:left/center/right | N +align | String | left | options: left/center/right | N allowInputOverMax | Boolean | false | \- | N autoWidth | Boolean | false | \- | N autocomplete | String | undefined | \- | N @@ -25,14 +25,14 @@ prefixIcon | TElement | - | Typescript:`TNode`。[see more ts definition](http readonly | Boolean | false | \- | N showClearIconOnEmpty | Boolean | false | \- | N showLimitNumber | Boolean | false | show limit number text on the right | N -size | String | medium | options:small/medium/large。Typescript:`SizeEnum`。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N -status | String | undefined | options:default/success/warning/error | N +size | String | medium | options: small/medium/large。Typescript:`SizeEnum`。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N +status | String | undefined | options: default/success/warning/error | N suffix | TNode | - | Typescript:`string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N suffixIcon | TElement | - | Typescript:`TNode`。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N tips | TNode | - | Typescript:`string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N -type | String | text | options:text/number/url/tel/password/search/submit/hidden | N -value | String / Number | '' | Typescript:`InputValue` `type InputValue = string`。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/src/input/type.ts) | N -defaultValue | String / Number | '' | uncontrolled property。Typescript:`InputValue` `type InputValue = string`。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/src/input/type.ts) | N +type | String | text | options: text/number/url/tel/password/search/submit/hidden | N +value | String | '' | Typescript:`InputValue` `type InputValue = string`。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/src/input/type.ts) | N +defaultValue | String | '' | uncontrolled property。Typescript:`InputValue` `type InputValue = string`。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/src/input/type.ts) | N onBlur | Function | | Typescript:`(value: InputValue, context: { e: FocusEvent }) => void`
| N onChange | Function | | Typescript:`(value: InputValue, context?: { e?: InputEvent \| MouseEvent \| CompositionEvent; trigger: 'input' \| 'initial' \| 'clear' }) => void`
| N onClear | Function | | Typescript:`(context: { e: MouseEvent }) => void`
| N diff --git a/src/input/input.md b/src/input/input.md index c0003c4b0..6f1cb9fd2 100644 --- a/src/input/input.md +++ b/src/input/input.md @@ -31,8 +31,8 @@ suffix | TNode | - | 后置图标前的后置内容。TS 类型:`string \| TNo suffixIcon | TElement | - | 组件后置图标。TS 类型:`TNode`。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N tips | TNode | - | 输入框下方提示文本,会根据不同的 `status` 呈现不同的样式。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N type | String | text | 输入框类型。可选项:text/number/url/tel/password/search/submit/hidden | N -value | String / Number | '' | 输入框的值。TS 类型:`InputValue` `type InputValue = string`。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/input/type.ts) | N -defaultValue | String / Number | '' | 输入框的值。非受控属性。TS 类型:`InputValue` `type InputValue = string`。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/input/type.ts) | N +value | String | '' | 输入框的值。TS 类型:`InputValue` `type InputValue = string`。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/input/type.ts) | N +defaultValue | String | '' | 输入框的值。非受控属性。TS 类型:`InputValue` `type InputValue = string`。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/input/type.ts) | N onBlur | Function | | TS 类型:`(value: InputValue, context: { e: FocusEvent }) => void`
失去焦点时触发 | N onChange | Function | | TS 类型:`(value: InputValue, context?: { e?: InputEvent \| MouseEvent \| CompositionEvent; trigger: 'input' \| 'initial' \| 'clear' }) => void`
输入框值发生变化时触发。`trigger=initial` 表示传入的数据不符合预期,组件自动处理后触发 change 告知父组件。如:初始值长度超过 `maxlength` 限制 | N onClear | Function | | TS 类型:`(context: { e: MouseEvent }) => void`
清空按钮点击时触发 | N