From 1eeb87a462e7ac8edd8f4f0d7daeef52cdcc98df Mon Sep 17 00:00:00 2001 From: jeannehuang Date: Tue, 9 Jan 2024 15:34:10 +0800 Subject: [PATCH 1/4] =?UTF-8?q?feat(action-sheet)=20=E5=B1=9E=E6=80=A7?= =?UTF-8?q?=E6=96=B0=E5=A2=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/TDesign.db | Bin 860160 -> 860160 bytes .../src/action-sheet/README.en-US.md | 7 ++--- .../src/action-sheet/README.md | 5 ++-- .../src/action-sheet/props.ts | 15 +++++++---- .../src/action-sheet/type.ts | 24 ++++++++++++------ .../tdesign-miniprogram/src/common/common.ts | 9 +++++-- 6 files changed, 40 insertions(+), 20 deletions(-) diff --git a/db/TDesign.db b/db/TDesign.db index 50c3c9c4aed4b460704239e53f2add4fdaae4a24..67d9611e6a2738cb8328fa863d127e4d1673b051 100644 GIT binary patch delta 605 zcmZoTVA62FWP&tf!bBNo#)ORtq5k~Gxk4Bi7_`}$nV7gmIhHja@ozuk&$#`FKa*_$ zF9QQ(6Y~cK_63|7oE6hAC^05(&tJe)$i&2BFPoHw1-DdlY zB}@z0IY4G{{pILucUZ#&#LPg<0>rF9%(mTO4f{c5cA&wH%s&{W+f88foc>;j(RurU z3+z%%Z0ri$1>6^=e^6qSoz5%3C_eqgBu1s_K0=Io(=9HuADupzkEdgM>lOCdOki7h zCUYrl*SOB^!2;n<;ZmGlahp8?!kfyawEf0yb{FR9E&M!%%oDg|rz`ODq_%&(&kn>K zK+FlmT-(3i=jKsh=bOM7%`C?-Jz)Z)I>o1J?!4uYA_Ln|OZnl(Syv z4CC0$AdR8n!xgLyP^R5X_oq&>6Vf#jLMvfjDozn3>>`1#=z*{p{{|Yf`Pe}p{bRj z85W_E=@ww?lo>^N&4JcUk9^F`BLK9>8rh=h7c4l$rZ;3T3MnI-X<}tyjAkZCX!~_h HUQI3lQZTZ{ delta 554 zcmW-dO=uHA6vt;~Cz+3(-C3nUFlm~m7exdQJw%HVZ4dEa(~FXeRS!ii1+^E07Xym9 z$x4$YCFH>D@31nwVq=2$gFGG!K;9;_8UA3$sfrw|fn3mM3!^wls63u@7a zqw3dTIIU}4auj)T7(P)Dd65&RaHk%KS(W=jw$#<{WDJWL_DK!Ck%V=gZ7V-4&asbb z&J@Wh)(OLjGweg;)9iiZ9NW^BuOvX!z6+?BWqp0DM+%tQUDH0~LY4cZL}l15v;TUh zPi8D^C+KrETt!P*_{as?924>)Tf7f<01OQmI(m;6ux~5Kc z$xXGLf$@#9xPY*k2kI>nCB1Bkw2i}fy5@=!91#sZ5v8s3Y~&grf8vRT=isyx>jB` `interface ActionSheetItem {label: string; color?: string; disabled?: boolean }`。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/action-sheet/type.ts) | Y show-cancel | Boolean | true | \- | N -style | String | - | \- | N -theme | String | list | options:list/grid | N +theme | String | list | options: list/grid | N visible | Boolean | false | required | Y default-visible | Boolean | undefined | required。uncontrolled property | Y @@ -19,5 +20,5 @@ default-visible | Boolean | undefined | required。uncontrolled property | Y name | params | description -- | -- | -- cancel | \- | \- -close | \- | \- +close | `(trigger: TriggerSource)` | [see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/action-sheet/type.ts)。
`type TriggerSource = 'overlay' \| 'command' \| 'select' `
selected | `(selected: ActionSheetItem \| string, index: number)` | \- diff --git a/packages/products/tdesign-miniprogram/src/action-sheet/README.md b/packages/products/tdesign-miniprogram/src/action-sheet/README.md index 5a5564514..423e47216 100644 --- a/packages/products/tdesign-miniprogram/src/action-sheet/README.md +++ b/packages/products/tdesign-miniprogram/src/action-sheet/README.md @@ -5,11 +5,12 @@ 名称 | 类型 | 默认值 | 说明 | 必传 -- | -- | -- | -- | -- +align | String | center | `0.29.0`。水平对齐方式。可选项:center/left | N cancel-text | String | - | 设置取消按钮的文本 | N count | Number | 8 | 设置每页展示菜单的数量,仅当 type=grid 时有效 | N +description | String | - | `0.29.0`。动作面板描述文字 | N items | Array | - | 必需。菜单项。TS 类型:`Array` `interface ActionSheetItem {label: string; color?: string; disabled?: boolean }`。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/action-sheet/type.ts) | Y show-cancel | Boolean | true | 是否显示取消按钮 | N -style | String | - | 自定义组件样式 | N theme | String | list | 展示类型,列表和表格形式展示。可选项:list/grid | N visible | Boolean | false | 必需。显示与隐藏 | Y default-visible | Boolean | undefined | 必需。显示与隐藏。非受控属性 | Y @@ -19,5 +20,5 @@ default-visible | Boolean | undefined | 必需。显示与隐藏。非受控属 名称 | 参数 | 描述 -- | -- | -- cancel | \- | 点击取消按钮时触发 -close | \- | 关闭时触发 +close | `(trigger: TriggerSource)` | 关闭时触发。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/action-sheet/type.ts)。
`type TriggerSource = 'overlay' \| 'command' \| 'select' `
selected | `(selected: ActionSheetItem \| string, index: number)` | 选择菜单项时触发 diff --git a/packages/products/tdesign-miniprogram/src/action-sheet/props.ts b/packages/products/tdesign-miniprogram/src/action-sheet/props.ts index 61ce6f068..03edaa891 100644 --- a/packages/products/tdesign-miniprogram/src/action-sheet/props.ts +++ b/packages/products/tdesign-miniprogram/src/action-sheet/props.ts @@ -6,6 +6,11 @@ import { TdActionSheetProps } from './type'; const props: TdActionSheetProps = { + /** 水平对齐方式 */ + align: { + type: String, + value: 'center', + }, /** 设置取消按钮的文本 */ cancelText: { type: String, @@ -16,6 +21,11 @@ const props: TdActionSheetProps = { type: Number, value: 8, }, + /** 动作面板描述文字 */ + description: { + type: String, + value: '', + }, /** 菜单项 */ items: { type: Array, @@ -26,11 +36,6 @@ const props: TdActionSheetProps = { type: Boolean, value: true, }, - /** 自定义组件样式 */ - style: { - type: String, - value: '', - }, /** 展示类型,列表和表格形式展示 */ theme: { type: String, diff --git a/packages/products/tdesign-miniprogram/src/action-sheet/type.ts b/packages/products/tdesign-miniprogram/src/action-sheet/type.ts index d72347fd5..42206ec2b 100644 --- a/packages/products/tdesign-miniprogram/src/action-sheet/type.ts +++ b/packages/products/tdesign-miniprogram/src/action-sheet/type.ts @@ -5,6 +5,14 @@ * */ export interface TdActionSheetProps { + /** + * 水平对齐方式 + * @default center + */ + align?: { + type: StringConstructor; + value?: 'center' | 'left'; + }; /** * 设置取消按钮的文本 * @default '' @@ -21,6 +29,14 @@ export interface TdActionSheetProps { type: NumberConstructor; value?: number; }; + /** + * 动作面板描述文字 + * @default '' + */ + description?: { + type: StringConstructor; + value?: string; + }; /** * 菜单项 */ @@ -36,14 +52,6 @@ export interface TdActionSheetProps { type: BooleanConstructor; value?: boolean; }; - /** - * 自定义组件样式 - * @default '' - */ - style?: { - type: StringConstructor; - value?: string; - }; /** * 展示类型,列表和表格形式展示 * @default list diff --git a/packages/products/tdesign-miniprogram/src/common/common.ts b/packages/products/tdesign-miniprogram/src/common/common.ts index cd1ce185e..4b8b1957a 100644 --- a/packages/products/tdesign-miniprogram/src/common/common.ts +++ b/packages/products/tdesign-miniprogram/src/common/common.ts @@ -34,6 +34,11 @@ export type HorizontalAlignEnum = 'left' | 'center' | 'right'; export type VerticalAlignEnum = 'top' | 'middle' | 'bottom'; +export enum LayoutEnum { + VERTICAL = 'vertical', + HORIZONTAL = 'horizontal', +} + export type ClassName = { [className: string]: any } | ClassName[] | string; export type CSSSelector = string; @@ -85,7 +90,7 @@ export type InfinityScroll = TScroll; export interface ScrollToElementParams { /** 跳转元素下标 */ - index: number; + index?: number; /** 跳转元素距离顶部的距离 */ top?: number; /** 单个元素高度非固定场景下,即 isFixedRowHeight = false。延迟设置元素位置,一般用于依赖不同高度异步渲染等场景,单位:毫秒 */ @@ -94,5 +99,5 @@ export interface ScrollToElementParams { } export interface ComponentScrollToElementParams extends ScrollToElementParams { - key: string | number; + key?: string | number; } From ead53cedeaf3e9d9e7852a2f5231cd0acad4ae85 Mon Sep 17 00:00:00 2001 From: jeannehuang Date: Tue, 9 Jan 2024 16:12:00 +0800 Subject: [PATCH 2/4] =?UTF-8?q?feat(action-sheet)=20=E5=B1=9E=E6=80=A7?= =?UTF-8?q?=E6=96=B0=E5=A2=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/action-sheet/README.en-US.md | 35 ++++---- .../src/action-sheet/README.md | 35 ++++---- .../src/action-sheet/props.ts | 10 +++ .../src/action-sheet/type.ts | 16 ++++ packages/scripts/api.json | 86 +++++++++++++++++++ 5 files changed, 150 insertions(+), 32 deletions(-) diff --git a/packages/products/tdesign-miniprogram/src/action-sheet/README.en-US.md b/packages/products/tdesign-miniprogram/src/action-sheet/README.en-US.md index 9cab87fed..99d7ff373 100644 --- a/packages/products/tdesign-miniprogram/src/action-sheet/README.en-US.md +++ b/packages/products/tdesign-miniprogram/src/action-sheet/README.en-US.md @@ -1,24 +1,27 @@ :: BASE_DOC :: ## API + ### ActionSheet Props -name | type | default | description | required --- | -- | -- | -- | -- -align | String | center | `0.29.0`。options: center/left | N -cancel-text | String | - | \- | N -count | Number | 8 | \- | N -description | String | - | `0.29.0` | N -items | Array | - | required。Typescript:`Array` `interface ActionSheetItem {label: string; color?: string; disabled?: boolean }`。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/action-sheet/type.ts) | Y -show-cancel | Boolean | true | \- | N -theme | String | list | options: list/grid | N -visible | Boolean | false | required | Y -default-visible | Boolean | undefined | required。uncontrolled property | Y +| name | type | default | description | required | +| --------------- | ------- | --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | +| align | String | center | `0.29.0`。options: center/left | N | +| cancel-text | String | - | \- | N | +| count | Number | 8 | \- | N | +| description | String | - | `0.29.0` | N | +| items | Array | - | required。Typescript:`Array` `interface ActionSheetItem {label: string; color?: string; disabled?: boolean }`。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/action-sheet/type.ts) | Y | +| popup-props | Object | {} | \- | N | +| show-cancel | Boolean | true | \- | N | +| show-overlay | Boolean | true | \- | N | +| theme | String | list | options: list/grid | N | +| visible | Boolean | false | required | Y | +| default-visible | Boolean | undefined | required。uncontrolled property | Y | ### ActionSheet Events -name | params | description --- | -- | -- -cancel | \- | \- -close | `(trigger: TriggerSource)` | [see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/action-sheet/type.ts)。
`type TriggerSource = 'overlay' \| 'command' \| 'select' `
-selected | `(selected: ActionSheetItem \| string, index: number)` | \- +| name | params | description | +| -------- | ------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| cancel | \- | \- | +| close | `(trigger: TriggerSource)` | [see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/action-sheet/type.ts)。
`type TriggerSource = 'overlay' \| 'command' \| 'select' `
| +| selected | `(selected: ActionSheetItem \| string, index: number)` | \- | diff --git a/packages/products/tdesign-miniprogram/src/action-sheet/README.md b/packages/products/tdesign-miniprogram/src/action-sheet/README.md index 423e47216..691eb3bc9 100644 --- a/packages/products/tdesign-miniprogram/src/action-sheet/README.md +++ b/packages/products/tdesign-miniprogram/src/action-sheet/README.md @@ -1,24 +1,27 @@ :: BASE_DOC :: ## API + ### ActionSheet Props -名称 | 类型 | 默认值 | 说明 | 必传 --- | -- | -- | -- | -- -align | String | center | `0.29.0`。水平对齐方式。可选项:center/left | N -cancel-text | String | - | 设置取消按钮的文本 | N -count | Number | 8 | 设置每页展示菜单的数量,仅当 type=grid 时有效 | N -description | String | - | `0.29.0`。动作面板描述文字 | N -items | Array | - | 必需。菜单项。TS 类型:`Array` `interface ActionSheetItem {label: string; color?: string; disabled?: boolean }`。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/action-sheet/type.ts) | Y -show-cancel | Boolean | true | 是否显示取消按钮 | N -theme | String | list | 展示类型,列表和表格形式展示。可选项:list/grid | N -visible | Boolean | false | 必需。显示与隐藏 | Y -default-visible | Boolean | undefined | 必需。显示与隐藏。非受控属性 | Y +| 名称 | 类型 | 默认值 | 说明 | 必传 | +| --------------- | ------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---- | +| align | String | center | `0.29.0`。水平对齐方式。可选项:center/left | N | +| cancel-text | String | - | 设置取消按钮的文本 | N | +| count | Number | 8 | 设置每页展示菜单的数量,仅当 type=grid 时有效 | N | +| description | String | - | `0.29.0`。动作面板描述文字 | N | +| items | Array | - | 必需。菜单项。TS 类型:`Array` `interface ActionSheetItem {label: string; color?: string; disabled?: boolean }`。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/action-sheet/type.ts) | Y | +| popup-props | Object | {} | popupProps 透传 | N | +| show-cancel | Boolean | true | 是否显示取消按钮 | N | +| show-overlay | Boolean | true | 是否显示遮罩层 | N | +| theme | String | list | 展示类型,列表和表格形式展示。可选项:list/grid | N | +| visible | Boolean | false | 必需。显示与隐藏 | Y | +| default-visible | Boolean | undefined | 必需。显示与隐藏。非受控属性 | Y | ### ActionSheet Events -名称 | 参数 | 描述 --- | -- | -- -cancel | \- | 点击取消按钮时触发 -close | `(trigger: TriggerSource)` | 关闭时触发。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/action-sheet/type.ts)。
`type TriggerSource = 'overlay' \| 'command' \| 'select' `
-selected | `(selected: ActionSheetItem \| string, index: number)` | 选择菜单项时触发 +| 名称 | 参数 | 描述 | +| -------- | ------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| cancel | \- | 点击取消按钮时触发 | +| close | `(trigger: TriggerSource)` | 关闭时触发。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/action-sheet/type.ts)。
`type TriggerSource = 'overlay' \| 'command' \| 'select' `
| +| selected | `(selected: ActionSheetItem \| string, index: number)` | 选择菜单项时触发 | diff --git a/packages/products/tdesign-miniprogram/src/action-sheet/props.ts b/packages/products/tdesign-miniprogram/src/action-sheet/props.ts index 03edaa891..cf884f0f4 100644 --- a/packages/products/tdesign-miniprogram/src/action-sheet/props.ts +++ b/packages/products/tdesign-miniprogram/src/action-sheet/props.ts @@ -31,11 +31,21 @@ const props: TdActionSheetProps = { type: Array, required: true, }, + /** popupProps透传 */ + popupProps: { + type: Object, + value: {}, + }, /** 是否显示取消按钮 */ showCancel: { type: Boolean, value: true, }, + /** 是否显示遮罩层 */ + showOverlay: { + type: Boolean, + value: true, + }, /** 展示类型,列表和表格形式展示 */ theme: { type: String, diff --git a/packages/products/tdesign-miniprogram/src/action-sheet/type.ts b/packages/products/tdesign-miniprogram/src/action-sheet/type.ts index 42206ec2b..93997cc4f 100644 --- a/packages/products/tdesign-miniprogram/src/action-sheet/type.ts +++ b/packages/products/tdesign-miniprogram/src/action-sheet/type.ts @@ -44,6 +44,14 @@ export interface TdActionSheetProps { type: ArrayConstructor; value?: Array; }; + /** + * popupProps透传 + * @default {} + */ + popupProps?: { + type: ObjectConstructor; + value?: object; + }; /** * 是否显示取消按钮 * @default true @@ -52,6 +60,14 @@ export interface TdActionSheetProps { type: BooleanConstructor; value?: boolean; }; + /** + * 是否显示遮罩层 + * @default true + */ + showOverlay?: { + type: BooleanConstructor; + value?: boolean; + }; /** * 展示类型,列表和表格形式展示 * @default list diff --git a/packages/scripts/api.json b/packages/scripts/api.json index 67ceb64f6..e3bf520bf 100644 --- a/packages/scripts/api.json +++ b/packages/scripts/api.json @@ -2198,6 +2198,49 @@ "Array" ] }, + { + "id": 1704784516, + "platform_framework": [ + "8", + "16", + "32", + "64" + ], + "component": "ActionSheet", + "field_category": 1, + "field_name": "popupProps", + "field_type": [ + "8" + ], + "field_default_value": "{}", + "field_enum": "", + "field_desc_zh": "popupProps透传", + "field_desc_en": null, + "field_required": 0, + "event_input": "", + "create_time": "2024-01-09 07:15:16", + "update_time": "2024-01-09 07:15:16", + "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": [ + "Vue(Mobile)", + "React(Mobile)", + "Angular(Mobile)", + "Miniprogram" + ], + "field_type_text": [ + "Object" + ] + }, { "id": 1611, "platform_framework": [ @@ -2241,6 +2284,49 @@ "Boolean" ] }, + { + "id": 1704784443, + "platform_framework": [ + "8", + "16", + "32", + "64" + ], + "component": "ActionSheet", + "field_category": 1, + "field_name": "showOverlay", + "field_type": [ + "4" + ], + "field_default_value": "true", + "field_enum": "", + "field_desc_zh": "是否显示遮罩层", + "field_desc_en": null, + "field_required": 0, + "event_input": "", + "create_time": "2024-01-09 07:14:03", + "update_time": "2024-01-09 07:14:03", + "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": [ + "Vue(Mobile)", + "React(Mobile)", + "Angular(Mobile)", + "Miniprogram" + ], + "field_type_text": [ + "Boolean" + ] + }, { "id": 1609, "platform_framework": [ From e37ef6fd6bb65fef9c638dff044dd40b9902e8fb Mon Sep 17 00:00:00 2001 From: jeannehuang Date: Tue, 9 Jan 2024 17:31:30 +0800 Subject: [PATCH 3/4] =?UTF-8?q?feat(action-sheet)=20items=E6=9B=B4?= =?UTF-8?q?=E6=96=B0interface?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/TDesign.db | Bin 860160 -> 860160 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/db/TDesign.db b/db/TDesign.db index 67d9611e6a2738cb8328fa863d127e4d1673b051..c7f2dd1b897356da654f51b2c6869fbb01112e2b 100644 GIT binary patch delta 196 zcmZoTVA62FWP&tf;zSu|#>B>i)&$1Z1g6#m=GFw3)&$np1h%aS>EZs$UCQ;5Ya*8+-*e7(b``!XPDWM{78Bm$?J67CZJ1eDmNQ)0p0b(!JSP)_({$6d z%ywdp#hn^bOpMB$;*7k!@(i53#>Naymeb2Nv+vZf&P>kFv$s+xE-A{)OSdjAO-swH h@I(<)sD0cpu{~=aI}mdKF((jn0WtUXtbIJw5&_~hKXd>9 delta 128 zcmZoTVA62FWP&tf!bBNo#)QU%)&$1Z1g6#m=GFw3)&$np1h%aS>?(X&oQ$j@EGEne+f_EO+c2{<26Sp{Pua|Vo|B2ua=YnT cW>d!YtbOc2%mKulK+FZi+}pGE@k~nu06+IC6951J From ab00e83e557e86a5706e4d8eee856997c812b8b5 Mon Sep 17 00:00:00 2001 From: jeannehuang Date: Tue, 9 Jan 2024 17:47:42 +0800 Subject: [PATCH 4/4] =?UTF-8?q?feat(action-sheet)=20items=E6=9B=B4?= =?UTF-8?q?=E6=96=B0interface?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/action-sheet/README.en-US.md | 26 +++++++++---------- .../src/action-sheet/README.md | 26 +++++++++---------- .../src/action-sheet/type.ts | 2 ++ packages/scripts/api.json | 2 +- 4 files changed, 29 insertions(+), 27 deletions(-) diff --git a/packages/products/tdesign-miniprogram/src/action-sheet/README.en-US.md b/packages/products/tdesign-miniprogram/src/action-sheet/README.en-US.md index 99d7ff373..03336c966 100644 --- a/packages/products/tdesign-miniprogram/src/action-sheet/README.en-US.md +++ b/packages/products/tdesign-miniprogram/src/action-sheet/README.en-US.md @@ -4,19 +4,19 @@ ### ActionSheet Props -| name | type | default | description | required | -| --------------- | ------- | --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | -| align | String | center | `0.29.0`。options: center/left | N | -| cancel-text | String | - | \- | N | -| count | Number | 8 | \- | N | -| description | String | - | `0.29.0` | N | -| items | Array | - | required。Typescript:`Array` `interface ActionSheetItem {label: string; color?: string; disabled?: boolean }`。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/action-sheet/type.ts) | Y | -| popup-props | Object | {} | \- | N | -| show-cancel | Boolean | true | \- | N | -| show-overlay | Boolean | true | \- | N | -| theme | String | list | options: list/grid | N | -| visible | Boolean | false | required | Y | -| default-visible | Boolean | undefined | required。uncontrolled property | Y | +| name | type | default | description | required | +| --------------- | ------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | +| align | String | center | `0.29.0`。options: center/left | N | +| cancel-text | String | - | \- | N | +| count | Number | 8 | \- | N | +| description | String | - | `0.29.0` | N | +| items | Array | - | required。Typescript:`Array` `interface ActionSheetItem {label: string; color?: string; disabled?: boolean;icon?: string;suffixIcon?: string; }`。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/action-sheet/type.ts) | Y | +| popup-props | Object | {} | \- | N | +| show-cancel | Boolean | true | \- | N | +| show-overlay | Boolean | true | \- | N | +| theme | String | list | options: list/grid | N | +| visible | Boolean | false | required | Y | +| default-visible | Boolean | undefined | required。uncontrolled property | Y | ### ActionSheet Events diff --git a/packages/products/tdesign-miniprogram/src/action-sheet/README.md b/packages/products/tdesign-miniprogram/src/action-sheet/README.md index 691eb3bc9..8f15c21f0 100644 --- a/packages/products/tdesign-miniprogram/src/action-sheet/README.md +++ b/packages/products/tdesign-miniprogram/src/action-sheet/README.md @@ -4,19 +4,19 @@ ### ActionSheet Props -| 名称 | 类型 | 默认值 | 说明 | 必传 | -| --------------- | ------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---- | -| align | String | center | `0.29.0`。水平对齐方式。可选项:center/left | N | -| cancel-text | String | - | 设置取消按钮的文本 | N | -| count | Number | 8 | 设置每页展示菜单的数量,仅当 type=grid 时有效 | N | -| description | String | - | `0.29.0`。动作面板描述文字 | N | -| items | Array | - | 必需。菜单项。TS 类型:`Array` `interface ActionSheetItem {label: string; color?: string; disabled?: boolean }`。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/action-sheet/type.ts) | Y | -| popup-props | Object | {} | popupProps 透传 | N | -| show-cancel | Boolean | true | 是否显示取消按钮 | N | -| show-overlay | Boolean | true | 是否显示遮罩层 | N | -| theme | String | list | 展示类型,列表和表格形式展示。可选项:list/grid | N | -| visible | Boolean | false | 必需。显示与隐藏 | Y | -| default-visible | Boolean | undefined | 必需。显示与隐藏。非受控属性 | Y | +| 名称 | 类型 | 默认值 | 说明 | 必传 | +| --------------- | ------- | --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- | +| align | String | center | `0.29.0`。水平对齐方式。可选项:center/left | N | +| cancel-text | String | - | 设置取消按钮的文本 | N | +| count | Number | 8 | 设置每页展示菜单的数量,仅当 type=grid 时有效 | N | +| description | String | - | `0.29.0`。动作面板描述文字 | N | +| items | Array | - | 必需。菜单项。TS 类型:`Array` `interface ActionSheetItem {label: string; color?: string; disabled?: boolean;icon?: string;suffixIcon?: string; }`。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/action-sheet/type.ts) | Y | +| popup-props | Object | {} | popupProps 透传 | N | +| show-cancel | Boolean | true | 是否显示取消按钮 | N | +| show-overlay | Boolean | true | 是否显示遮罩层 | N | +| theme | String | list | 展示类型,列表和表格形式展示。可选项:list/grid | N | +| visible | Boolean | false | 必需。显示与隐藏 | Y | +| default-visible | Boolean | undefined | 必需。显示与隐藏。非受控属性 | Y | ### ActionSheet Events diff --git a/packages/products/tdesign-miniprogram/src/action-sheet/type.ts b/packages/products/tdesign-miniprogram/src/action-sheet/type.ts index 93997cc4f..db484afee 100644 --- a/packages/products/tdesign-miniprogram/src/action-sheet/type.ts +++ b/packages/products/tdesign-miniprogram/src/action-sheet/type.ts @@ -98,4 +98,6 @@ export interface ActionSheetItem { label: string; color?: string; disabled?: boolean; + icon?: string; + suffixIcon?: string; } diff --git a/packages/scripts/api.json b/packages/scripts/api.json index e3bf520bf..c1e47878a 100644 --- a/packages/scripts/api.json +++ b/packages/scripts/api.json @@ -2178,7 +2178,7 @@ "create_time": "2021-09-02 12:06:15", "update_time": "2022-04-08 09:06:29", "event_output": null, - "custom_field_type": "Array【interface ActionSheetItem {label: string; color?: string; disabled?: boolean }】", + "custom_field_type": "Array【interface ActionSheetItem {label: string; color?: string; disabled?: boolean;icon?: string;suffixIcon?: string; }】", "syntactic_sugar": null, "readonly": 1, "html_attribute": 0,