Skip to content

Commit a0f57f8

Browse files
authored
docs(Input): add version information to the onValidate attr (#646)
1 parent f221e4b commit a0f57f8

File tree

6 files changed

+9
-40
lines changed

6 files changed

+9
-40
lines changed

db/TDesign.db

0 Bytes
Binary file not shown.

packages/products/tdesign-mobile-vue/src/input/input.en-US.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ onBlur | Function | | Typescript:`(value: InputValue, context: { e: FocusEven
3939
onChange | Function | | Typescript:`(value: InputValue, context?: { e?: InputEvent \| MouseEvent \| CompositionEvent; trigger: 'input' \| 'initial' \| 'clear' }) => void`<br/>trigger on input value changed | N
4040
onClear | Function | | Typescript:`(context: { e: TouchEvent }) => void`<br/> | N
4141
onFocus | Function | | Typescript:`(value: InputValue, context: { e: FocusEvent }) => void`<br/> | N
42-
onValidate | Function | | Typescript:`(context: { error?: 'exceed-maximum' \| 'below-minimum' }) => void`<br/>trigger on text length being over max length or max character | N
42+
onValidate | Function | | Typescript:`(context: { error?: 'exceed-maximum' \| 'below-minimum' }) => void`<br/>`1.9.1`trigger on text length being over max length or max character | N
4343

4444
### Input Events
4545

@@ -49,4 +49,4 @@ blur | `(value: InputValue, context: { e: FocusEvent })` | \-
4949
change | `(value: InputValue, context?: { e?: InputEvent \| MouseEvent \| CompositionEvent; trigger: 'input' \| 'initial' \| 'clear' })` | trigger on input value changed
5050
clear | `(context: { e: TouchEvent })` | \-
5151
focus | `(value: InputValue, context: { e: FocusEvent })` | \-
52-
validate | `(context: { error?: 'exceed-maximum' \| 'below-minimum' })` | trigger on text length being over max length or max character
52+
validate | `(context: { error?: 'exceed-maximum' \| 'below-minimum' })` | `1.9.1`trigger on text length being over max length or max character

packages/products/tdesign-mobile-vue/src/input/input.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ onBlur | Function | | TS 类型:`(value: InputValue, context: { e: FocusEvent
3939
onChange | Function | | TS 类型:`(value: InputValue, context?: { e?: InputEvent \| MouseEvent \| CompositionEvent; trigger: 'input' \| 'initial' \| 'clear' }) => void`<br/>输入框值发生变化时触发。`trigger=initial` 表示传入的数据不符合预期,组件自动处理后触发 change 告知父组件。如:初始值长度超过 `maxlength` 限制 | N
4040
onClear | Function | | TS 类型:`(context: { e: TouchEvent }) => void`<br/>清空按钮点击时触发 | N
4141
onFocus | Function | | TS 类型:`(value: InputValue, context: { e: FocusEvent }) => void`<br/>获得焦点时触发 | N
42-
onValidate | Function | | TS 类型:`(context: { error?: 'exceed-maximum' \| 'below-minimum' }) => void`<br/>【暂不支持】字数超出限制时触发 | N
42+
onValidate | Function | | TS 类型:`(context: { error?: 'exceed-maximum' \| 'below-minimum' }) => void`<br/>`1.9.1`字数超出限制时触发 | N
4343

4444
### Input Events
4545

@@ -49,4 +49,4 @@ blur | `(value: InputValue, context: { e: FocusEvent })` | 失去焦点时触发
4949
change | `(value: InputValue, context?: { e?: InputEvent \| MouseEvent \| CompositionEvent; trigger: 'input' \| 'initial' \| 'clear' })` | 输入框值发生变化时触发。`trigger=initial` 表示传入的数据不符合预期,组件自动处理后触发 change 告知父组件。如:初始值长度超过 `maxlength` 限制
5050
clear | `(context: { e: TouchEvent })` | 清空按钮点击时触发
5151
focus | `(value: InputValue, context: { e: FocusEvent })` | 获得焦点时触发
52-
validate | `(context: { error?: 'exceed-maximum' \| 'below-minimum' })` | 【暂不支持】字数超出限制时触发
52+
validate | `(context: { error?: 'exceed-maximum' \| 'below-minimum' })` | `1.9.1`字数超出限制时触发

packages/products/tdesign-mobile-vue/src/input/props.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,6 @@ export default {
158158
onClear: Function as PropType<TdInputProps['onClear']>,
159159
/** 获得焦点时触发 */
160160
onFocus: Function as PropType<TdInputProps['onFocus']>,
161-
/** 【暂不支持】字数超出限制时触发 */
161+
/** 字数超出限制时触发 */
162162
onValidate: Function as PropType<TdInputProps['onValidate']>,
163163
};

packages/products/tdesign-mobile-vue/src/input/type.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ export interface TdInputProps {
155155
*/
156156
onFocus?: (value: InputValue, context: { e: FocusEvent }) => void;
157157
/**
158-
* 【暂不支持】字数超出限制时触发
158+
* 字数超出限制时触发
159159
*/
160160
onValidate?: (context: { error?: 'exceed-maximum' | 'below-minimum' }) => void;
161161
}

packages/scripts/api.json

Lines changed: 3 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -73283,6 +73283,7 @@
7328373283
"1",
7328473284
"2",
7328573285
"4",
73286+
"8",
7328673287
"16",
7328773288
"32",
7328873289
"64"
@@ -73306,53 +73307,21 @@
7330673307
"html_attribute": 0,
7330773308
"trigger_elements": "",
7330873309
"deprecated": 0,
73309-
"version": "",
73310+
"version": "{\n\"Vue(Mobile)\": \"1.9.1\"\n}",
7331073311
"test_description": "{\"PC\":{\"event\":[{\"props\":{\"value\":\"Hello World\",\"maxlength\":5},\"expect\":[{\"trigger\":\"\",\"event\":{\"validate\":[{\"error\":\"exceed-maximum\"}]}}]}]}}",
7331173312
"support_default_value": 0,
7331273313
"field_category_text": "Events",
7331373314
"platform_framework_text": [
7331473315
"Vue(PC)",
7331573316
"React(PC)",
7331673317
"Angular(PC)",
73318+
"Vue(Mobile)",
7331773319
"React(Mobile)",
7331873320
"Angular(Mobile)",
7331973321
"Miniprogram"
7332073322
],
7332173323
"field_type_text": []
7332273324
},
73323-
{
73324-
"id": 1712916279,
73325-
"platform_framework": [
73326-
"8"
73327-
],
73328-
"component": "Input",
73329-
"field_category": 2,
73330-
"field_name": "validate",
73331-
"field_type": [],
73332-
"field_default_value": "",
73333-
"field_enum": "",
73334-
"field_desc_zh": "【暂不支持】字数超出限制时触发",
73335-
"field_desc_en": "trigger on text length being over max length or max character",
73336-
"field_required": 0,
73337-
"event_input": "(context: { error?: 'exceed-maximum' | 'below-minimum' })",
73338-
"create_time": "2024-04-12 10:04:39",
73339-
"update_time": "2024-04-12 10:04:39",
73340-
"event_output": null,
73341-
"custom_field_type": null,
73342-
"syntactic_sugar": null,
73343-
"readonly": 1,
73344-
"html_attribute": 0,
73345-
"trigger_elements": "",
73346-
"deprecated": 0,
73347-
"version": "",
73348-
"test_description": null,
73349-
"support_default_value": 0,
73350-
"field_category_text": "Events",
73351-
"platform_framework_text": [
73352-
"Vue(Mobile)"
73353-
],
73354-
"field_type_text": []
73355-
},
7335673325
{
7335773326
"id": 2279,
7335873327
"platform_framework": [

0 commit comments

Comments
 (0)