From 2db8b3857926adbbb0f9e0a1ab222a437f58af41 Mon Sep 17 00:00:00 2001
From: liweijie0812 <674416404@qq.com>
Date: Fri, 14 Jul 2023 21:16:02 +0800
Subject: [PATCH] docs(Input): value type remove Number (#2582)
---
src/input/input.en-US.md | 12 ++++++------
src/input/input.md | 4 ++--
src/input/props.ts | 4 ++--
3 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/src/input/input.en-US.md b/src/input/input.en-US.md
index 9658d0945..e6a0253e1 100644
--- a/src/input/input.en-US.md
+++ b/src/input/input.en-US.md
@@ -5,7 +5,7 @@
name | type | default | description | required
-- | -- | -- | -- | --
-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
@@ -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 | 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
+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 | options:text/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`
| 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 54d04fe97..cdd09d557 100644
--- a/src/input/input.md
+++ b/src/input/input.md
@@ -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`
失去焦点时触发 | 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
diff --git a/src/input/props.ts b/src/input/props.ts
index b7be8b705..332d51137 100644
--- a/src/input/props.ts
+++ b/src/input/props.ts
@@ -113,12 +113,12 @@ export default {
},
/** 输入框的值 */
value: {
- type: [String, Number] as PropType,
+ type: String as PropType,
default: '',
},
/** 输入框的值,非受控属性 */
defaultValue: {
- type: [String, Number] as PropType,
+ type: String as PropType,
default: '',
},
/** 失去焦点时触发 */