From 42bcd0c98ee379165c91ccfcccb0863fe07684aa Mon Sep 17 00:00:00 2001 From: "Y." Date: Tue, 5 Nov 2024 15:25:44 +0800 Subject: [PATCH] docs(Input): update api docs (#456) --- db/TDesign.db | Bin 1003520 -> 1003520 bytes .../src/input/README.en-US.md | 4 +- .../tdesign-miniprogram/src/input/README.md | 4 +- .../tdesign-miniprogram/src/input/props.ts | 10 +-- .../tdesign-miniprogram/src/input/type.ts | 4 +- packages/scripts/api.json | 82 ++---------------- 6 files changed, 16 insertions(+), 88 deletions(-) diff --git a/db/TDesign.db b/db/TDesign.db index 5942acb8d74ca78b12560e1e2329debadd9c676f..2261a14ccd9480e0fd2353e46e6bcbb3e465d3f2 100644 GIT binary patch delta 256 zcmZozVB4_3c7inHhlw)ItREQk%DNg;wx%%NtDkQL zlf>&eJurc*Y=Dwz8q#2-W(wFMkb$*8=DYA z2s1;-be;`-DojjsCmSlLY!BJM=fKOvcYph|y?maGEDQ{cirXLW<5M&g;b87#U{hi4 s+GnAAIKF03>--lK=n! delta 256 zcmZozVB4_3c7inHn~5^ctZx|f$~qcTwx%%Nt7o*Io}a{}ygjXfaWfN}y=PuQY02~i z0ba#+hh|0~W&&bnAZ7t#Rv=~rVs;?r0Afxc<^p1FAm-Wb(9C=A4m)oSqaV`_hUqd% zyq?no6ZqN~Q>I@_;5)^{d1d*6L_WstOOp5wGBY!?Fm2CBnWb)~_aR@Vn zFf)Yk-Jj02flp&$WOMKv4%f`fIvi2g!6 diff --git a/packages/products/tdesign-miniprogram/src/input/README.en-US.md b/packages/products/tdesign-miniprogram/src/input/README.en-US.md index 493e9153..4e4de00d 100644 --- a/packages/products/tdesign-miniprogram/src/input/README.en-US.md +++ b/packages/products/tdesign-miniprogram/src/input/README.en-US.md @@ -20,7 +20,7 @@ confirm-type | String | done | options: send/search/next/go/done | N cursor | Number | - | required | Y cursor-color | String | - | \- | N cursor-spacing | Number | 0 | \- | N -disabled | Boolean | false | make input to be disabled | N +disabled | Boolean | undefined | make input to be disabled | N error-message | String | - | `deprecated` | N focus | Boolean | false | \- | N format | Function | - | input value formatter, `type=number` does not work. if you need to format number, `InputNumber` Component might be better。Typescript:`InputFormatType` `type InputFormatType = (value: InputValue) => string`。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/input/type.ts) | N @@ -34,7 +34,7 @@ placeholder | String | undefined | \- | N placeholder-class | String | input-placeholder | \- | N placeholder-style | String | - | required | Y prefix-icon | String / Object / Slot | - | [see more ts definition](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N -readonly | Boolean | false | \- | N +readonly | Boolean | undefined | \- | N safe-password-cert-path | String | - | \- | N safe-password-custom-hash | String | - | \- | N safe-password-length | Number | - | \- | N diff --git a/packages/products/tdesign-miniprogram/src/input/README.md b/packages/products/tdesign-miniprogram/src/input/README.md index 625cb93d..f18e955a 100644 --- a/packages/products/tdesign-miniprogram/src/input/README.md +++ b/packages/products/tdesign-miniprogram/src/input/README.md @@ -20,7 +20,7 @@ confirm-type | String | done | 设置键盘右下角按钮的文字,仅在type cursor | Number | - | 必需。指定 focus 时的光标位置 | Y cursor-color | String | - | 光标颜色。iOS 下的格式为十六进制颜色值 #000000,安卓下的只支持 default 和 green,Skyline 下无限制 | N cursor-spacing | Number | 0 | 指定光标与键盘的距离,取 input 距离底部的距离和 cursor-spacing 指定的距离的最小值作为光标与键盘的距离 | N -disabled | Boolean | false | 是否禁用输入框 | N +disabled | Boolean | undefined | 是否禁用输入框 | N error-message | String | - | 已废弃。错误提示文本,值为空不显示(废弃属性,如果需要,请更为使用 status 和 tips) | N focus | Boolean | false | 获取焦点 | N format | Function | - | 指定输入框展示值的格式。TS 类型:`InputFormatType` `type InputFormatType = (value: InputValue) => string`。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/input/type.ts) | N @@ -34,7 +34,7 @@ placeholder | String | undefined | 占位符 | N placeholder-class | String | input-placeholder | 指定 placeholder 的样式类 | N placeholder-style | String | - | 必需。指定 placeholder 的样式 | Y prefix-icon | String / Object / Slot | - | 组件前置图标。值为字符串表示图标名称,值为 `Object` 类型,表示透传至 `icon`。[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N -readonly | Boolean | false | 【开发中】只读状态 | N +readonly | Boolean | undefined | 只读状态 | N safe-password-cert-path | String | - | 安全键盘加密公钥的路径,只支持包内路径 | N safe-password-custom-hash | String | - | 安全键盘计算 hash 的算法表达式,如 `md5(sha1('foo' + sha256(sm3(password + 'bar'))))` | N safe-password-length | Number | - | 安全键盘输入密码长度 | N diff --git a/packages/products/tdesign-miniprogram/src/input/props.ts b/packages/products/tdesign-miniprogram/src/input/props.ts index 86c06835..84c3e3ba 100644 --- a/packages/products/tdesign-miniprogram/src/input/props.ts +++ b/packages/products/tdesign-miniprogram/src/input/props.ts @@ -68,8 +68,8 @@ const props: TdInputProps = { }, /** 是否禁用输入框 */ disabled: { - type: Boolean, - value: false, + type: null, + value: undefined, }, /** 获取焦点 */ focus: { @@ -123,10 +123,10 @@ const props: TdInputProps = { prefixIcon: { type: null, }, - /** 【开发中】只读状态 */ + /** 只读状态 */ readonly: { - type: Boolean, - value: false, + type: null, + value: undefined, }, /** 安全键盘加密公钥的路径,只支持包内路径 */ safePasswordCertPath: { diff --git a/packages/products/tdesign-miniprogram/src/input/type.ts b/packages/products/tdesign-miniprogram/src/input/type.ts index b5b03070..c6130f4c 100644 --- a/packages/products/tdesign-miniprogram/src/input/type.ts +++ b/packages/products/tdesign-miniprogram/src/input/type.ts @@ -103,7 +103,6 @@ export interface TdInputProps { }; /** * 是否禁用输入框 - * @default false */ disabled?: { type: BooleanConstructor; @@ -194,8 +193,7 @@ export interface TdInputProps { value?: string | object; }; /** - * 【开发中】只读状态 - * @default false + * 只读状态 */ readonly?: { type: BooleanConstructor; diff --git a/packages/scripts/api.json b/packages/scripts/api.json index fda208f0..5a3ecd8c 100644 --- a/packages/scripts/api.json +++ b/packages/scripts/api.json @@ -63235,7 +63235,8 @@ "4", "8", "16", - "32" + "32", + "64" ], "component": "Input", "field_category": 1, @@ -63268,43 +63269,7 @@ "Angular(PC)", "Vue(Mobile)", "React(Mobile)", - "Angular(Mobile)" - ], - "field_type_text": [ - "Boolean" - ] - }, - { - "id": 1712579825, - "platform_framework": [ - "64" - ], - "component": "Input", - "field_category": 1, - "field_name": "disabled", - "field_type": [ - "4" - ], - "field_default_value": "false", - "field_enum": "", - "field_desc_zh": "是否禁用输入框", - "field_desc_en": "make input to be disabled", - "field_required": 0, - "event_input": "", - "create_time": "2024-04-08 12:37:05", - "update_time": "2024-04-08 12:37:05", - "event_output": null, - "custom_field_type": null, - "syntactic_sugar": null, - "readonly": 1, - "html_attribute": 0, - "trigger_elements": "", - "deprecated": 0, - "version": "", - "test_description": null, - "support_default_value": 0, - "field_category_text": "Props", - "platform_framework_text": [ + "Angular(Mobile)", "Miniprogram" ], "field_type_text": [ @@ -64087,7 +64052,8 @@ "4", "8", "16", - "32" + "32", + "64" ], "component": "Input", "field_category": 1, @@ -64120,43 +64086,7 @@ "Angular(PC)", "Vue(Mobile)", "React(Mobile)", - "Angular(Mobile)" - ], - "field_type_text": [ - "Boolean" - ] - }, - { - "id": 1712916368, - "platform_framework": [ - "64" - ], - "component": "Input", - "field_category": 1, - "field_name": "readonly", - "field_type": [ - "4" - ], - "field_default_value": "false", - "field_enum": "", - "field_desc_zh": "【开发中】只读状态", - "field_desc_en": null, - "field_required": 0, - "event_input": "", - "create_time": "2024-04-12 10:06:08", - "update_time": "2024-04-12 10:06:08", - "event_output": null, - "custom_field_type": null, - "syntactic_sugar": null, - "readonly": 1, - "html_attribute": 0, - "trigger_elements": "", - "deprecated": 0, - "version": "", - "test_description": null, - "support_default_value": 0, - "field_category_text": "Props", - "platform_framework_text": [ + "Angular(Mobile)", "Miniprogram" ], "field_type_text": [