Skip to content

Commit 751f24d

Browse files
authored
fix(ActionSheet): defaultVisible attr is not required (#605)
1 parent ee59a34 commit 751f24d

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

db/TDesign.db

0 Bytes
Binary file not shown.

packages/products/tdesign-mobile-react/src/action-sheet/action-sheet.en-US.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ popupProps | Object | {} | Typescript:`PopupProps`,[Popup API Documents](./p
1717
showCancel | Boolean | true | \- | N
1818
showOverlay | Boolean | true | \- | N
1919
theme | String | list | options: list/grid | N
20-
visible | Boolean | false | required | Y
21-
defaultVisible | Boolean | false | required。uncontrolled property | Y
20+
visible | Boolean | false | \- | N
21+
defaultVisible | Boolean | false | uncontrolled property | N
2222
onCancel | Function | | Typescript:`(context: { e: MouseEvent }) => void`<br/> | N
2323
onClose | Function | | Typescript:`(trigger: ActionSheetTriggerSource) => void`<br/>[see more ts definition](https://github.com/Tencent/tdesign-mobile-react/tree/develop/src/action-sheet/type.ts)。<br/>`type ActionSheetTriggerSource = 'overlay' \| 'command' \| 'select' `<br/> | N
2424
onSelected | Function | | Typescript:`(selected: ActionSheetItem \| string, index: number) => void`<br/> | N

packages/products/tdesign-mobile-react/src/action-sheet/action-sheet.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ popupProps | Object | {} | 透传 Popup 组件全部属性。TS 类型:`PopupP
1717
showCancel | Boolean | true | 是否显示取消按钮 | N
1818
showOverlay | Boolean | true | 是否显示遮罩层 | N
1919
theme | String | list | 展示类型,列表和表格形式展示。可选项:list/grid | N
20-
visible | Boolean | false | 必需。显示与隐藏 | Y
21-
defaultVisible | Boolean | false | 必需。显示与隐藏。非受控属性 | Y
20+
visible | Boolean | false | 显示与隐藏 | N
21+
defaultVisible | Boolean | false | 显示与隐藏。非受控属性 | N
2222
onCancel | Function | | TS 类型:`(context: { e: MouseEvent }) => void`<br/>点击取消按钮时触发 | N
2323
onClose | Function | | TS 类型:`(trigger: ActionSheetTriggerSource) => void`<br/>关闭时触发。[详细类型定义](https://github.com/Tencent/tdesign-mobile-react/tree/develop/src/action-sheet/type.ts)。<br/>`type ActionSheetTriggerSource = 'overlay' \| 'command' \| 'select' `<br/> | N
2424
onSelected | Function | | TS 类型:`(selected: ActionSheetItem \| string, index: number) => void`<br/>选择菜单项时触发 | N

packages/products/tdesign-mobile-react/src/action-sheet/type.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,12 @@ export interface TdActionSheetProps {
5858
* 显示与隐藏
5959
* @default false
6060
*/
61-
visible: boolean;
61+
visible?: boolean;
6262
/**
6363
* 显示与隐藏,非受控属性
6464
* @default false
6565
*/
66-
defaultVisible: boolean;
66+
defaultVisible?: boolean;
6767
/**
6868
* 点击取消按钮时触发
6969
*/

packages/scripts/api.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2501,7 +2501,7 @@
25012501
"field_enum": "",
25022502
"field_desc_zh": "显示与隐藏",
25032503
"field_desc_en": null,
2504-
"field_required": 1,
2504+
"field_required": 0,
25052505
"event_input": "",
25062506
"create_time": "2021-09-02 12:01:55",
25072507
"update_time": "2022-04-08 09:10:44",

0 commit comments

Comments
 (0)