Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix drawer api desc #469

Merged
merged 1 commit into from
Nov 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified db/TDesign.db
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
:: BASE_DOC ::

## API


### Drawer Props

name | type | default | description | required
Expand Down
6 changes: 2 additions & 4 deletions packages/products/tdesign-mobile-react/src/drawer/drawer.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
:: BASE_DOC ::

## API


### Drawer Props

名称 | 类型 | 默认值 | 描述 | 必传
Expand All @@ -19,8 +17,8 @@ showOverlay | Boolean | true | 是否显示遮罩层 | N
title | TNode | - | 抽屉的标题。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-react/blob/develop/src/common.ts) | N
visible | Boolean | false | 组件是否可见 | N
zIndex | Number | - | 抽屉层级,样式默认为 1500 | N
onBeforeClose | Function | | TS 类型:`() => void`<br/>对话框执行消失动画效果前触发 | N
onBeforeOpen | Function | | TS 类型:`() => void`<br/>对话框执行弹出动画效果前触发 | N
onBeforeClose | Function | | TS 类型:`() => void`<br/>抽屉执行关闭动画效果前触发 | N
onBeforeOpen | Function | | TS 类型:`() => void`<br/>抽屉执行打开动画效果前触发 | N
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
onItemClick | Function | | TS 类型:`( index: number, item: DrawerItem, context: { e: MouseEvent }) => void`<br/>点击抽屉里的列表项 | N
onOverlayClick | Function | | TS 类型:`(context: { e: MouseEvent }) => void`<br/>如果蒙层存在,点击蒙层时触发 | N
Expand Down
4 changes: 2 additions & 2 deletions packages/products/tdesign-mobile-react/src/drawer/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ export interface TdDrawerProps {
*/
zIndex?: number;
/**
* 对话框执行消失动画效果前触发
* 抽屉执行关闭动画效果前触发
*/
onBeforeClose?: () => void;
/**
* 对话框执行弹出动画效果前触发
* 抽屉执行打开动画效果前触发
*/
onBeforeOpen?: () => void;
/**
Expand Down
8 changes: 4 additions & 4 deletions packages/products/tdesign-mobile-vue/src/drawer/drawer.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ showOverlay | Boolean | true | 是否显示遮罩层 | N
title | String / Slot / Function | - | 抽屉的标题。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N
visible | Boolean | false | 组件是否可见 | N
zIndex | Number | - | 抽屉层级,样式默认为 1500 | N
onBeforeClose | Function | | TS 类型:`() => void`<br/>对话框执行消失动画效果前触发 | N
onBeforeOpen | Function | | TS 类型:`() => void`<br/>对话框执行弹出动画效果前触发 | N
onBeforeClose | Function | | TS 类型:`() => void`<br/>抽屉执行关闭动画效果前触发 | N
onBeforeOpen | Function | | TS 类型:`() => void`<br/>抽屉执行打开动画效果前触发 | N
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
onItemClick | Function | | TS 类型:`( index: number, item: DrawerItem, context: { e: MouseEvent }) => void`<br/>点击抽屉里的列表项 | N
onOverlayClick | Function | | TS 类型:`(context: { e: MouseEvent }) => void`<br/>如果蒙层存在,点击蒙层时触发 | N
Expand All @@ -25,8 +25,8 @@ onOverlayClick | Function | | TS 类型:`(context: { e: MouseEvent }) => void

名称 | 参数 | 描述
-- | -- | --
before-close | \- | 对话框执行消失动画效果前触发
before-open | \- | 对话框执行弹出动画效果前触发
before-close | \- | 抽屉执行关闭动画效果前触发
before-open | \- | 抽屉执行打开动画效果前触发
close | `(trigger: TriggerSource)` | 关闭时触发。[详细类型定义](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/drawer/type.ts)。<br/>`type TriggerSource = 'overlay'`<br/>
item-click | `( index: number, item: DrawerItem, context: { e: MouseEvent })` | 点击抽屉里的列表项
overlay-click | `(context: { e: MouseEvent })` | 如果蒙层存在,点击蒙层时触发
Expand Down
4 changes: 2 additions & 2 deletions packages/products/tdesign-mobile-vue/src/drawer/props.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ export default {
zIndex: {
type: Number,
},
/** 对话框执行消失动画效果前触发 */
/** 抽屉执行关闭动画效果前触发 */
onBeforeClose: Function as PropType<TdDrawerProps['onBeforeClose']>,
/** 对话框执行弹出动画效果前触发 */
/** 抽屉执行打开动画效果前触发 */
onBeforeOpen: Function as PropType<TdDrawerProps['onBeforeOpen']>,
/** 关闭时触发。[详细类型定义](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/drawer/type.ts)。<br/>`type TriggerSource = 'overlay'`<br/> */
onClose: Function as PropType<TdDrawerProps['onClose']>,
Expand Down
4 changes: 2 additions & 2 deletions packages/products/tdesign-mobile-vue/src/drawer/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@ export interface TdDrawerProps {
*/
zIndex?: number;
/**
* 对话框执行消失动画效果前触发
* 抽屉执行关闭动画效果前触发
*/
onBeforeClose?: () => void;
/**
* 对话框执行弹出动画效果前触发
* 抽屉执行打开动画效果前触发
*/
onBeforeOpen?: () => void;
/**
Expand Down
4 changes: 2 additions & 2 deletions packages/products/tdesign-react/src/drawer/drawer.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ size | String | 'small' | 尺寸,支持 'small', 'medium', 'large','35px', '
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
visible | Boolean | false | 组件是否可见 | N
zIndex | Number | - | 抽屉层级,样式默认为 1500 | N
onBeforeClose | Function | | TS 类型:`() => void`<br/>对话框执行消失动画效果前触发 | N
onBeforeOpen | Function | | TS 类型:`() => void`<br/>对话框执行弹出动画效果前触发 | N
onBeforeClose | Function | | TS 类型:`() => void`<br/>抽屉执行关闭动画效果前触发 | N
onBeforeOpen | Function | | TS 类型:`() => void`<br/>抽屉执行打开动画效果前触发 | N
onCancel | Function | | TS 类型:`(context: { e: MouseEvent }) => void`<br/>如果“取消”按钮存在,点击“取消”按钮时触发,同时触发关闭事件 | N
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
onCloseBtnClick | Function | | TS 类型:`(context: { e: MouseEvent }) => void`<br/>如果关闭按钮存在,点击关闭按钮时触发该事件,同时触发关闭事件 | N
Expand Down
4 changes: 2 additions & 2 deletions packages/products/tdesign-react/src/drawer/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,11 @@ export interface TdDrawerProps {
*/
zIndex?: number;
/**
* 对话框执行消失动画效果前触发
* 抽屉执行关闭动画效果前触发
*/
onBeforeClose?: () => void;
/**
* 对话框执行弹出动画效果前触发
* 抽屉执行打开动画效果前触发
*/
onBeforeOpen?: () => void;
/**
Expand Down
8 changes: 4 additions & 4 deletions packages/products/tdesign-vue-next/src/drawer/drawer.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ size | String | 'small' | 尺寸,支持 'small', 'medium', 'large','35px', '
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
visible | Boolean | false | 组件是否可见 | N
zIndex | Number | - | 抽屉层级,样式默认为 1500 | N
onBeforeClose | Function | | TS 类型:`() => void`<br/>对话框执行消失动画效果前触发 | N
onBeforeOpen | Function | | TS 类型:`() => void`<br/>对话框执行弹出动画效果前触发 | N
onBeforeClose | Function | | TS 类型:`() => void`<br/>抽屉执行关闭动画效果前触发 | N
onBeforeOpen | Function | | TS 类型:`() => void`<br/>抽屉执行打开动画效果前触发 | N
onCancel | Function | | TS 类型:`(context: { e: MouseEvent }) => void`<br/>如果“取消”按钮存在,点击“取消”按钮时触发,同时触发关闭事件 | N
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
onCloseBtnClick | Function | | TS 类型:`(context: { e: MouseEvent }) => void`<br/>如果关闭按钮存在,点击关闭按钮时触发该事件,同时触发关闭事件 | N
Expand All @@ -75,8 +75,8 @@ onSizeDragEnd | Function | | TS 类型:`(context: { e: MouseEvent; size: numb

名称 | 参数 | 描述
-- | -- | --
before-close | \- | 对话框执行消失动画效果前触发
before-open | \- | 对话框执行弹出动画效果前触发
before-close | \- | 抽屉执行关闭动画效果前触发
before-open | \- | 抽屉执行打开动画效果前触发
cancel | `(context: { e: MouseEvent })` | 如果“取消”按钮存在,点击“取消”按钮时触发,同时触发关闭事件
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/>
close-btn-click | `(context: { e: MouseEvent })` | 如果关闭按钮存在,点击关闭按钮时触发该事件,同时触发关闭事件
Expand Down
4 changes: 2 additions & 2 deletions packages/products/tdesign-vue-next/src/drawer/props.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@ export default {
zIndex: {
type: Number,
},
/** 对话框执行消失动画效果前触发 */
/** 抽屉执行关闭动画效果前触发 */
onBeforeClose: Function as PropType<TdDrawerProps['onBeforeClose']>,
/** 对话框执行弹出动画效果前触发 */
/** 抽屉执行打开动画效果前触发 */
onBeforeOpen: Function as PropType<TdDrawerProps['onBeforeOpen']>,
/** 如果“取消”按钮存在,点击“取消”按钮时触发,同时触发关闭事件 */
onCancel: Function as PropType<TdDrawerProps['onCancel']>,
Expand Down
4 changes: 2 additions & 2 deletions packages/products/tdesign-vue-next/src/drawer/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,11 @@ export interface TdDrawerProps {
*/
zIndex?: number;
/**
* 对话框执行消失动画效果前触发
* 抽屉执行关闭动画效果前触发
*/
onBeforeClose?: () => void;
/**
* 对话框执行弹出动画效果前触发
* 抽屉执行打开动画效果前触发
*/
onBeforeOpen?: () => void;
/**
Expand Down
8 changes: 4 additions & 4 deletions packages/products/tdesign-vue/src/drawer/drawer.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ size | String | 'small' | 尺寸,支持 'small', 'medium', 'large','35px', '
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
visible | Boolean | false | 组件是否可见 | N
zIndex | Number | - | 抽屉层级,样式默认为 1500 | N
onBeforeClose | Function | | TS 类型:`() => void`<br/>对话框执行消失动画效果前触发 | N
onBeforeOpen | Function | | TS 类型:`() => void`<br/>对话框执行弹出动画效果前触发 | N
onBeforeClose | Function | | TS 类型:`() => void`<br/>抽屉执行关闭动画效果前触发 | N
onBeforeOpen | Function | | TS 类型:`() => void`<br/>抽屉执行打开动画效果前触发 | N
onCancel | Function | | TS 类型:`(context: { e: MouseEvent }) => void`<br/>如果“取消”按钮存在,点击“取消”按钮时触发,同时触发关闭事件 | N
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
onCloseBtnClick | Function | | TS 类型:`(context: { e: MouseEvent }) => void`<br/>如果关闭按钮存在,点击关闭按钮时触发该事件,同时触发关闭事件 | N
Expand All @@ -39,8 +39,8 @@ onSizeDragEnd | Function | | TS 类型:`(context: { e: MouseEvent; size: numb

名称 | 参数 | 描述
-- | -- | --
before-close | \- | 对话框执行消失动画效果前触发
before-open | \- | 对话框执行弹出动画效果前触发
before-close | \- | 抽屉执行关闭动画效果前触发
before-open | \- | 抽屉执行打开动画效果前触发
cancel | `(context: { e: MouseEvent })` | 如果“取消”按钮存在,点击“取消”按钮时触发,同时触发关闭事件
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/>
close-btn-click | `(context: { e: MouseEvent })` | 如果关闭按钮存在,点击关闭按钮时触发该事件,同时触发关闭事件
Expand Down
4 changes: 2 additions & 2 deletions packages/products/tdesign-vue/src/drawer/props.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@ export default {
zIndex: {
type: Number,
},
/** 对话框执行消失动画效果前触发 */
/** 抽屉执行关闭动画效果前触发 */
onBeforeClose: Function as PropType<TdDrawerProps['onBeforeClose']>,
/** 对话框执行弹出动画效果前触发 */
/** 抽屉执行打开动画效果前触发 */
onBeforeOpen: Function as PropType<TdDrawerProps['onBeforeOpen']>,
/** 如果“取消”按钮存在,点击“取消”按钮时触发,同时触发关闭事件 */
onCancel: Function as PropType<TdDrawerProps['onCancel']>,
Expand Down
4 changes: 2 additions & 2 deletions packages/products/tdesign-vue/src/drawer/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,11 @@ export interface TdDrawerProps {
*/
zIndex?: number;
/**
* 对话框执行消失动画效果前触发
* 抽屉执行关闭动画效果前触发
*/
onBeforeClose?: () => void;
/**
* 对话框执行弹出动画效果前触发
* 抽屉执行打开动画效果前触发
*/
onBeforeOpen?: () => void;
/**
Expand Down
4 changes: 2 additions & 2 deletions packages/scripts/api.json
Original file line number Diff line number Diff line change
Expand Up @@ -43171,7 +43171,7 @@
"field_type": [],
"field_default_value": "",
"field_enum": "",
"field_desc_zh": "对话框执行消失动画效果前触发",
"field_desc_zh": "抽屉执行关闭动画效果前触发",
"field_desc_en": null,
"field_required": 0,
"event_input": "",
Expand Down Expand Up @@ -43214,7 +43214,7 @@
"field_type": [],
"field_default_value": "",
"field_enum": "",
"field_desc_zh": "对话框执行弹出动画效果前触发",
"field_desc_zh": "抽屉执行打开动画效果前触发",
"field_desc_en": null,
"field_required": 0,
"event_input": "",
Expand Down
Loading