Skip to content

Commit

Permalink
docs(Input): update api docs (#456)
Browse files Browse the repository at this point in the history
  • Loading branch information
anlyyao authored Nov 5, 2024
1 parent 9bb504c commit 42bcd0c
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 88 deletions.
Binary file modified db/TDesign.db
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions packages/products/tdesign-miniprogram/src/input/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
10 changes: 5 additions & 5 deletions packages/products/tdesign-miniprogram/src/input/props.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ const props: TdInputProps = {
},
/** 是否禁用输入框 */
disabled: {
type: Boolean,
value: false,
type: null,
value: undefined,
},
/** 获取焦点 */
focus: {
Expand Down Expand Up @@ -123,10 +123,10 @@ const props: TdInputProps = {
prefixIcon: {
type: null,
},
/** 【开发中】只读状态 */
/** 只读状态 */
readonly: {
type: Boolean,
value: false,
type: null,
value: undefined,
},
/** 安全键盘加密公钥的路径,只支持包内路径 */
safePasswordCertPath: {
Expand Down
4 changes: 1 addition & 3 deletions packages/products/tdesign-miniprogram/src/input/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ export interface TdInputProps {
};
/**
* 是否禁用输入框
* @default false
*/
disabled?: {
type: BooleanConstructor;
Expand Down Expand Up @@ -194,8 +193,7 @@ export interface TdInputProps {
value?: string | object;
};
/**
* 【开发中】只读状态
* @default false
* 只读状态
*/
readonly?: {
type: BooleanConstructor;
Expand Down
82 changes: 6 additions & 76 deletions packages/scripts/api.json
Original file line number Diff line number Diff line change
Expand Up @@ -63235,7 +63235,8 @@
"4",
"8",
"16",
"32"
"32",
"64"
],
"component": "Input",
"field_category": 1,
Expand Down Expand Up @@ -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": [
Expand Down Expand Up @@ -64087,7 +64052,8 @@
"4",
"8",
"16",
"32"
"32",
"64"
],
"component": "Input",
"field_category": 1,
Expand Down Expand Up @@ -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": [
Expand Down

0 comments on commit 42bcd0c

Please sign in to comment.