Skip to content

Commit 4185a62

Browse files
authored
fix drawer api desc (#469)
1 parent b342640 commit 4185a62

File tree

16 files changed

+34
-38
lines changed

16 files changed

+34
-38
lines changed

db/TDesign.db

0 Bytes
Binary file not shown.

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
:: BASE_DOC ::
22

33
## API
4-
5-
64
### Drawer Props
75

86
name | type | default | description | required

packages/products/tdesign-mobile-react/src/drawer/drawer.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
:: BASE_DOC ::
22

33
## API
4-
5-
64
### Drawer Props
75

86
名称 | 类型 | 默认值 | 描述 | 必传
@@ -19,8 +17,8 @@ showOverlay | Boolean | true | 是否显示遮罩层 | N
1917
title | TNode | - | 抽屉的标题。TS 类型:`string \| TNode`[通用类型定义](https://github.com/Tencent/tdesign-mobile-react/blob/develop/src/common.ts) | N
2018
visible | Boolean | false | 组件是否可见 | N
2119
zIndex | Number | - | 抽屉层级,样式默认为 1500 | N
22-
onBeforeClose | Function | | TS 类型:`() => void`<br/>对话框执行消失动画效果前触发 | N
23-
onBeforeOpen | Function | | TS 类型:`() => void`<br/>对话框执行弹出动画效果前触发 | N
20+
onBeforeClose | Function | | TS 类型:`() => void`<br/>抽屉执行关闭动画效果前触发 | N
21+
onBeforeOpen | Function | | TS 类型:`() => void`<br/>抽屉执行打开动画效果前触发 | N
2422
onClose | Function | | TS 类型:`(trigger: TriggerSource) => void`<br/>关闭时触发。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/drawer/type.ts)。<br/>`type TriggerSource = 'overlay'`<br/> | N
2523
onItemClick | Function | | TS 类型:`( index: number, item: DrawerItem, context: { e: MouseEvent }) => void`<br/>点击抽屉里的列表项 | N
2624
onOverlayClick | Function | | TS 类型:`(context: { e: MouseEvent }) => void`<br/>如果蒙层存在,点击蒙层时触发 | N

packages/products/tdesign-mobile-react/src/drawer/type.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,11 @@ export interface TdDrawerProps {
5454
*/
5555
zIndex?: number;
5656
/**
57-
* 对话框执行消失动画效果前触发
57+
* 抽屉执行关闭动画效果前触发
5858
*/
5959
onBeforeClose?: () => void;
6060
/**
61-
* 对话框执行弹出动画效果前触发
61+
* 抽屉执行打开动画效果前触发
6262
*/
6363
onBeforeOpen?: () => void;
6464
/**

packages/products/tdesign-mobile-vue/src/drawer/drawer.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ showOverlay | Boolean | true | 是否显示遮罩层 | N
1515
title | String / Slot / Function | - | 抽屉的标题。TS 类型:`string \| TNode`[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N
1616
visible | Boolean | false | 组件是否可见 | N
1717
zIndex | Number | - | 抽屉层级,样式默认为 1500 | N
18-
onBeforeClose | Function | | TS 类型:`() => void`<br/>对话框执行消失动画效果前触发 | N
19-
onBeforeOpen | Function | | TS 类型:`() => void`<br/>对话框执行弹出动画效果前触发 | N
18+
onBeforeClose | Function | | TS 类型:`() => void`<br/>抽屉执行关闭动画效果前触发 | N
19+
onBeforeOpen | Function | | TS 类型:`() => void`<br/>抽屉执行打开动画效果前触发 | N
2020
onClose | Function | | TS 类型:`(trigger: TriggerSource) => void`<br/>关闭时触发。[详细类型定义](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/drawer/type.ts)。<br/>`type TriggerSource = 'overlay'`<br/> | N
2121
onItemClick | Function | | TS 类型:`( index: number, item: DrawerItem, context: { e: MouseEvent }) => void`<br/>点击抽屉里的列表项 | N
2222
onOverlayClick | Function | | TS 类型:`(context: { e: MouseEvent }) => void`<br/>如果蒙层存在,点击蒙层时触发 | N
@@ -25,8 +25,8 @@ onOverlayClick | Function | | TS 类型:`(context: { e: MouseEvent }) => void
2525

2626
名称 | 参数 | 描述
2727
-- | -- | --
28-
before-close | \- | 对话框执行消失动画效果前触发
29-
before-open | \- | 对话框执行弹出动画效果前触发
28+
before-close | \- | 抽屉执行关闭动画效果前触发
29+
before-open | \- | 抽屉执行打开动画效果前触发
3030
close | `(trigger: TriggerSource)` | 关闭时触发。[详细类型定义](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/drawer/type.ts)。<br/>`type TriggerSource = 'overlay'`<br/>
3131
item-click | `( index: number, item: DrawerItem, context: { e: MouseEvent })` | 点击抽屉里的列表项
3232
overlay-click | `(context: { e: MouseEvent })` | 如果蒙层存在,点击蒙层时触发

packages/products/tdesign-mobile-vue/src/drawer/props.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ export default {
5151
zIndex: {
5252
type: Number,
5353
},
54-
/** 对话框执行消失动画效果前触发 */
54+
/** 抽屉执行关闭动画效果前触发 */
5555
onBeforeClose: Function as PropType<TdDrawerProps['onBeforeClose']>,
56-
/** 对话框执行弹出动画效果前触发 */
56+
/** 抽屉执行打开动画效果前触发 */
5757
onBeforeOpen: Function as PropType<TdDrawerProps['onBeforeOpen']>,
5858
/** 关闭时触发。[详细类型定义](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/drawer/type.ts)。<br/>`type TriggerSource = 'overlay'`<br/> */
5959
onClose: Function as PropType<TdDrawerProps['onClose']>,

packages/products/tdesign-mobile-vue/src/drawer/type.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,11 @@ export interface TdDrawerProps {
5252
*/
5353
zIndex?: number;
5454
/**
55-
* 对话框执行消失动画效果前触发
55+
* 抽屉执行关闭动画效果前触发
5656
*/
5757
onBeforeClose?: () => void;
5858
/**
59-
* 对话框执行弹出动画效果前触发
59+
* 抽屉执行打开动画效果前触发
6060
*/
6161
onBeforeOpen?: () => void;
6262
/**

packages/products/tdesign-react/src/drawer/drawer.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ size | String | 'small' | 尺寸,支持 'small', 'medium', 'large','35px', '
2828
sizeDraggable | Boolean / Object | false | 抽屉大小可拖拽调整,横向抽屉调整宽度,纵向抽屉调整高度。`sizeDraggable.max``sizeDraggable.min` 用于控制拖拽尺寸大小限制。TS 类型:`boolean \| SizeDragLimit` `interface SizeDragLimit { max: number, min: number }`[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/drawer/type.ts) | N
2929
visible | Boolean | false | 组件是否可见 | N
3030
zIndex | Number | - | 抽屉层级,样式默认为 1500 | N
31-
onBeforeClose | Function | | TS 类型:`() => void`<br/>对话框执行消失动画效果前触发 | N
32-
onBeforeOpen | Function | | TS 类型:`() => void`<br/>对话框执行弹出动画效果前触发 | N
31+
onBeforeClose | Function | | TS 类型:`() => void`<br/>抽屉执行关闭动画效果前触发 | N
32+
onBeforeOpen | Function | | TS 类型:`() => void`<br/>抽屉执行打开动画效果前触发 | N
3333
onCancel | Function | | TS 类型:`(context: { e: MouseEvent }) => void`<br/>如果“取消”按钮存在,点击“取消”按钮时触发,同时触发关闭事件 | N
3434
onClose | Function | | TS 类型:`(context: DrawerCloseContext) => void`<br/>关闭事件,取消按钮点击时、关闭按钮点击时、ESC 按下时、点击蒙层时均会触发。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/drawer/type.ts)。<br/>`type DrawerEventSource = 'esc' \| 'close-btn' \| 'cancel' \| 'overlay'`<br/><br/>`interface DrawerCloseContext { trigger: DrawerEventSource; e: MouseEvent \| KeyboardEvent }`<br/> | N
3535
onCloseBtnClick | Function | | TS 类型:`(context: { e: MouseEvent }) => void`<br/>如果关闭按钮存在,点击关闭按钮时触发该事件,同时触发关闭事件 | N

packages/products/tdesign-react/src/drawer/type.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,11 @@ export interface TdDrawerProps {
106106
*/
107107
zIndex?: number;
108108
/**
109-
* 对话框执行消失动画效果前触发
109+
* 抽屉执行关闭动画效果前触发
110110
*/
111111
onBeforeClose?: () => void;
112112
/**
113-
* 对话框执行弹出动画效果前触发
113+
* 抽屉执行打开动画效果前触发
114114
*/
115115
onBeforeOpen?: () => void;
116116
/**

packages/products/tdesign-vue-next/src/drawer/drawer.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ size | String | 'small' | 尺寸,支持 'small', 'medium', 'large','35px', '
6161
sizeDraggable | Boolean / Object | false | 抽屉大小可拖拽调整,横向抽屉调整宽度,纵向抽屉调整高度。`sizeDraggable.max``sizeDraggable.min` 用于控制拖拽尺寸大小限制。TS 类型:`boolean \| SizeDragLimit` `interface SizeDragLimit { max: number, min: number }`[详细类型定义](https://github.com/Tencent/tdesign-vue-next/tree/develop/src/drawer/type.ts) | N
6262
visible | Boolean | false | 组件是否可见 | N
6363
zIndex | Number | - | 抽屉层级,样式默认为 1500 | N
64-
onBeforeClose | Function | | TS 类型:`() => void`<br/>对话框执行消失动画效果前触发 | N
65-
onBeforeOpen | Function | | TS 类型:`() => void`<br/>对话框执行弹出动画效果前触发 | N
64+
onBeforeClose | Function | | TS 类型:`() => void`<br/>抽屉执行关闭动画效果前触发 | N
65+
onBeforeOpen | Function | | TS 类型:`() => void`<br/>抽屉执行打开动画效果前触发 | N
6666
onCancel | Function | | TS 类型:`(context: { e: MouseEvent }) => void`<br/>如果“取消”按钮存在,点击“取消”按钮时触发,同时触发关闭事件 | N
6767
onClose | Function | | TS 类型:`(context: DrawerCloseContext) => void`<br/>关闭事件,取消按钮点击时、关闭按钮点击时、ESC 按下时、点击蒙层时均会触发。[详细类型定义](https://github.com/Tencent/tdesign-vue-next/tree/develop/src/drawer/type.ts)。<br/>`type DrawerEventSource = 'esc' \| 'close-btn' \| 'cancel' \| 'overlay'`<br/><br/>`interface DrawerCloseContext { trigger: DrawerEventSource; e: MouseEvent \| KeyboardEvent }`<br/> | N
6868
onCloseBtnClick | Function | | TS 类型:`(context: { e: MouseEvent }) => void`<br/>如果关闭按钮存在,点击关闭按钮时触发该事件,同时触发关闭事件 | N
@@ -75,8 +75,8 @@ onSizeDragEnd | Function | | TS 类型:`(context: { e: MouseEvent; size: numb
7575

7676
名称 | 参数 | 描述
7777
-- | -- | --
78-
before-close | \- | 对话框执行消失动画效果前触发
79-
before-open | \- | 对话框执行弹出动画效果前触发
78+
before-close | \- | 抽屉执行关闭动画效果前触发
79+
before-open | \- | 抽屉执行打开动画效果前触发
8080
cancel | `(context: { e: MouseEvent })` | 如果“取消”按钮存在,点击“取消”按钮时触发,同时触发关闭事件
8181
close | `(context: DrawerCloseContext)` | 关闭事件,取消按钮点击时、关闭按钮点击时、ESC 按下时、点击蒙层时均会触发。[详细类型定义](https://github.com/Tencent/tdesign-vue-next/tree/develop/src/drawer/type.ts)。<br/>`type DrawerEventSource = 'esc' \| 'close-btn' \| 'cancel' \| 'overlay'`<br/><br/>`interface DrawerCloseContext { trigger: DrawerEventSource; e: MouseEvent \| KeyboardEvent }`<br/>
8282
close-btn-click | `(context: { e: MouseEvent })` | 如果关闭按钮存在,点击关闭按钮时触发该事件,同时触发关闭事件

packages/products/tdesign-vue-next/src/drawer/props.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,9 @@ export default {
100100
zIndex: {
101101
type: Number,
102102
},
103-
/** 对话框执行消失动画效果前触发 */
103+
/** 抽屉执行关闭动画效果前触发 */
104104
onBeforeClose: Function as PropType<TdDrawerProps['onBeforeClose']>,
105-
/** 对话框执行弹出动画效果前触发 */
105+
/** 抽屉执行打开动画效果前触发 */
106106
onBeforeOpen: Function as PropType<TdDrawerProps['onBeforeOpen']>,
107107
/** 如果“取消”按钮存在,点击“取消”按钮时触发,同时触发关闭事件 */
108108
onCancel: Function as PropType<TdDrawerProps['onCancel']>,

packages/products/tdesign-vue-next/src/drawer/type.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,11 @@ export interface TdDrawerProps {
100100
*/
101101
zIndex?: number;
102102
/**
103-
* 对话框执行消失动画效果前触发
103+
* 抽屉执行关闭动画效果前触发
104104
*/
105105
onBeforeClose?: () => void;
106106
/**
107-
* 对话框执行弹出动画效果前触发
107+
* 抽屉执行打开动画效果前触发
108108
*/
109109
onBeforeOpen?: () => void;
110110
/**

packages/products/tdesign-vue/src/drawer/drawer.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ size | String | 'small' | 尺寸,支持 'small', 'medium', 'large','35px', '
2525
sizeDraggable | Boolean / Object | false | 抽屉大小可拖拽调整,横向抽屉调整宽度,纵向抽屉调整高度。`sizeDraggable.max``sizeDraggable.min` 用于控制拖拽尺寸大小限制。TS 类型:`boolean \| SizeDragLimit` `interface SizeDragLimit { max: number, min: number }`[详细类型定义](https://github.com/Tencent/tdesign-vue/tree/develop/src/drawer/type.ts) | N
2626
visible | Boolean | false | 组件是否可见 | N
2727
zIndex | Number | - | 抽屉层级,样式默认为 1500 | N
28-
onBeforeClose | Function | | TS 类型:`() => void`<br/>对话框执行消失动画效果前触发 | N
29-
onBeforeOpen | Function | | TS 类型:`() => void`<br/>对话框执行弹出动画效果前触发 | N
28+
onBeforeClose | Function | | TS 类型:`() => void`<br/>抽屉执行关闭动画效果前触发 | N
29+
onBeforeOpen | Function | | TS 类型:`() => void`<br/>抽屉执行打开动画效果前触发 | N
3030
onCancel | Function | | TS 类型:`(context: { e: MouseEvent }) => void`<br/>如果“取消”按钮存在,点击“取消”按钮时触发,同时触发关闭事件 | N
3131
onClose | Function | | TS 类型:`(context: DrawerCloseContext) => void`<br/>关闭事件,取消按钮点击时、关闭按钮点击时、ESC 按下时、点击蒙层时均会触发。[详细类型定义](https://github.com/Tencent/tdesign-vue/tree/develop/src/drawer/type.ts)。<br/>`type DrawerEventSource = 'esc' \| 'close-btn' \| 'cancel' \| 'overlay'`<br/><br/>`interface DrawerCloseContext { trigger: DrawerEventSource; e: MouseEvent \| KeyboardEvent }`<br/> | N
3232
onCloseBtnClick | Function | | TS 类型:`(context: { e: MouseEvent }) => void`<br/>如果关闭按钮存在,点击关闭按钮时触发该事件,同时触发关闭事件 | N
@@ -39,8 +39,8 @@ onSizeDragEnd | Function | | TS 类型:`(context: { e: MouseEvent; size: numb
3939

4040
名称 | 参数 | 描述
4141
-- | -- | --
42-
before-close | \- | 对话框执行消失动画效果前触发
43-
before-open | \- | 对话框执行弹出动画效果前触发
42+
before-close | \- | 抽屉执行关闭动画效果前触发
43+
before-open | \- | 抽屉执行打开动画效果前触发
4444
cancel | `(context: { e: MouseEvent })` | 如果“取消”按钮存在,点击“取消”按钮时触发,同时触发关闭事件
4545
close | `(context: DrawerCloseContext)` | 关闭事件,取消按钮点击时、关闭按钮点击时、ESC 按下时、点击蒙层时均会触发。[详细类型定义](https://github.com/Tencent/tdesign-vue/tree/develop/src/drawer/type.ts)。<br/>`type DrawerEventSource = 'esc' \| 'close-btn' \| 'cancel' \| 'overlay'`<br/><br/>`interface DrawerCloseContext { trigger: DrawerEventSource; e: MouseEvent \| KeyboardEvent }`<br/>
4646
close-btn-click | `(context: { e: MouseEvent })` | 如果关闭按钮存在,点击关闭按钮时触发该事件,同时触发关闭事件

packages/products/tdesign-vue/src/drawer/props.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,9 @@ export default {
100100
zIndex: {
101101
type: Number,
102102
},
103-
/** 对话框执行消失动画效果前触发 */
103+
/** 抽屉执行关闭动画效果前触发 */
104104
onBeforeClose: Function as PropType<TdDrawerProps['onBeforeClose']>,
105-
/** 对话框执行弹出动画效果前触发 */
105+
/** 抽屉执行打开动画效果前触发 */
106106
onBeforeOpen: Function as PropType<TdDrawerProps['onBeforeOpen']>,
107107
/** 如果“取消”按钮存在,点击“取消”按钮时触发,同时触发关闭事件 */
108108
onCancel: Function as PropType<TdDrawerProps['onCancel']>,

packages/products/tdesign-vue/src/drawer/type.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,11 @@ export interface TdDrawerProps {
100100
*/
101101
zIndex?: number;
102102
/**
103-
* 对话框执行消失动画效果前触发
103+
* 抽屉执行关闭动画效果前触发
104104
*/
105105
onBeforeClose?: () => void;
106106
/**
107-
* 对话框执行弹出动画效果前触发
107+
* 抽屉执行打开动画效果前触发
108108
*/
109109
onBeforeOpen?: () => void;
110110
/**

packages/scripts/api.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43171,7 +43171,7 @@
4317143171
"field_type": [],
4317243172
"field_default_value": "",
4317343173
"field_enum": "",
43174-
"field_desc_zh": "对话框执行消失动画效果前触发",
43174+
"field_desc_zh": "抽屉执行关闭动画效果前触发",
4317543175
"field_desc_en": null,
4317643176
"field_required": 0,
4317743177
"event_input": "",
@@ -43214,7 +43214,7 @@
4321443214
"field_type": [],
4321543215
"field_default_value": "",
4321643216
"field_enum": "",
43217-
"field_desc_zh": "对话框执行弹出动画效果前触发",
43217+
"field_desc_zh": "抽屉执行打开动画效果前触发",
4321843218
"field_desc_en": null,
4321943219
"field_required": 0,
4322043220
"event_input": "",

0 commit comments

Comments
 (0)