Skip to content

Commit

Permalink
docs(Input): value type remove Number (#2582)
Browse files Browse the repository at this point in the history
  • Loading branch information
liweijie0812 authored Jul 14, 2023
1 parent 91d7af5 commit 2db8b38
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
12 changes: 6 additions & 6 deletions src/input/input.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

name | type | default | description | required
-- | -- | -- | -- | --
align | String | left | optionsleft/center/right | N
align | String | left | options: left/center/right | N
allowInputOverMax | Boolean | false | \- | N
autoWidth | Boolean | false | \- | N
autocomplete | String | undefined | \- | N
Expand All @@ -23,14 +23,14 @@ prefixIcon | Slot / Function | - | Typescript:`TNode`。[see more ts definitio
readonly | Boolean | false | \- | N
showClearIconOnEmpty | Boolean | false | \- | N
showLimitNumber | Boolean | false | show limit number text on the right | N
size | String | medium | optionssmall/medium/large。Typescript:`SizeEnum`[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N
status | String | undefined | optionsdefault/success/warning/error | N
size | String | medium | options: small/medium/large。Typescript:`SizeEnum`[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N
status | String | undefined | options: default/success/warning/error | N
suffix | String / Slot / Function | - | Typescript:`string \| TNode`[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N
suffixIcon | Slot / Function | - | Typescript:`TNode`[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N
tips | String / Slot / Function | - | Typescript:`string \| TNode`[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N
type | String | text | optionstext/number/url/tel/password/search/submit/hidden | N
value | String / Number | '' | `v-model` is supported。Typescript:`InputValue` `type InputValue = string`[see more ts definition](https://github.com/Tencent/tdesign-vue/tree/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-vue/tree/develop/src/input/type.ts) | N
type | String | text | options: text/number/url/tel/password/search/submit/hidden | N
value | String | '' | `v-model` is supported。Typescript:`InputValue` `type InputValue = string`[see more ts definition](https://github.com/Tencent/tdesign-vue/tree/develop/src/input/type.ts) | N
defaultValue | String | '' | uncontrolled property。Typescript:`InputValue` `type InputValue = string`[see more ts definition](https://github.com/Tencent/tdesign-vue/tree/develop/src/input/type.ts) | N
onBlur | Function | | Typescript:`(value: InputValue, context: { e: FocusEvent }) => void`<br/> | N
onChange | Function | | Typescript:`(value: InputValue, context?: { e?: InputEvent \| MouseEvent \| CompositionEvent; trigger: 'input' \| 'initial' \| 'clear' }) => void`<br/> | N
onClear | Function | | Typescript:`(context: { e: MouseEvent }) => void`<br/> | N
Expand Down
4 changes: 2 additions & 2 deletions src/input/input.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ suffix | String / Slot / Function | - | 后置图标前的后置内容。TS 类
suffixIcon | Slot / Function | - | 组件后置图标。TS 类型:`TNode`[通用类型定义](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N
tips | String / Slot / Function | - | 输入框下方提示文本,会根据不同的 `status` 呈现不同的样式。TS 类型:`string \| TNode`[通用类型定义](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N
type | String | text | 输入框类型。可选项:text/number/url/tel/password/search/submit/hidden | N
value | String / Number | '' | 输入框的值。支持语法糖 `v-model`。TS 类型:`InputValue` `type InputValue = string`[详细类型定义](https://github.com/Tencent/tdesign-vue/tree/develop/src/input/type.ts) | N
defaultValue | String / Number | '' | 输入框的值。非受控属性。TS 类型:`InputValue` `type InputValue = string`[详细类型定义](https://github.com/Tencent/tdesign-vue/tree/develop/src/input/type.ts) | N
value | String | '' | 输入框的值。支持语法糖 `v-model`。TS 类型:`InputValue` `type InputValue = string`[详细类型定义](https://github.com/Tencent/tdesign-vue/tree/develop/src/input/type.ts) | N
defaultValue | String | '' | 输入框的值。非受控属性。TS 类型:`InputValue` `type InputValue = string`[详细类型定义](https://github.com/Tencent/tdesign-vue/tree/develop/src/input/type.ts) | N
onBlur | Function | | TS 类型:`(value: InputValue, context: { e: FocusEvent }) => void`<br/>失去焦点时触发 | N
onChange | Function | | TS 类型:`(value: InputValue, context?: { e?: InputEvent \| MouseEvent \| CompositionEvent; trigger: 'input' \| 'initial' \| 'clear' }) => void`<br/>输入框值发生变化时触发。`trigger=initial` 表示传入的数据不符合预期,组件自动处理后触发 change 告知父组件。如:初始值长度超过 `maxlength` 限制 | N
onClear | Function | | TS 类型:`(context: { e: MouseEvent }) => void`<br/>清空按钮点击时触发 | N
Expand Down
4 changes: 2 additions & 2 deletions src/input/props.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,12 @@ export default {
},
/** 输入框的值 */
value: {
type: [String, Number] as PropType<TdInputProps['value']>,
type: String as PropType<TdInputProps['value']>,
default: '',
},
/** 输入框的值,非受控属性 */
defaultValue: {
type: [String, Number] as PropType<TdInputProps['defaultValue']>,
type: String as PropType<TdInputProps['defaultValue']>,
default: '',
},
/** 失去焦点时触发 */
Expand Down

0 comments on commit 2db8b38

Please sign in to comment.