Skip to content

Commit

Permalink
feat(action-sheet) items更新interface
Browse files Browse the repository at this point in the history
  • Loading branch information
jeannehuang committed Jan 9, 2024
1 parent e37ef6f commit ab00e83
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<string \| ActionSheetItem>` `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<string \| ActionSheetItem>` `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

Expand Down
26 changes: 13 additions & 13 deletions packages/products/tdesign-miniprogram/src/action-sheet/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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<string \| ActionSheetItem>` `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<string \| ActionSheetItem>` `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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,4 +98,6 @@ export interface ActionSheetItem {
label: string;
color?: string;
disabled?: boolean;
icon?: string;
suffixIcon?: string;
}
2 changes: 1 addition & 1 deletion packages/scripts/api.json
Original file line number Diff line number Diff line change
Expand Up @@ -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<string | ActionSheetItem>【interface ActionSheetItem {label: string; color?: string; disabled?: boolean }】",
"custom_field_type": "Array<string | ActionSheetItem>【interface ActionSheetItem {label: string; color?: string; disabled?: boolean;icon?: string;suffixIcon?: string; }】",
"syntactic_sugar": null,
"readonly": 1,
"html_attribute": 0,
Expand Down

0 comments on commit ab00e83

Please sign in to comment.