From 12d92bbe25627a9d8904511ba3b6654c56894f62 Mon Sep 17 00:00:00 2001 From: Wesley <985189328@qq.com> Date: Wed, 13 Nov 2024 20:48:30 +0800 Subject: [PATCH] fix drawer api desc --- db/TDesign.db | Bin 1003520 -> 1003520 bytes .../src/drawer/drawer.en-US.md | 2 -- .../tdesign-mobile-react/src/drawer/drawer.md | 6 ++---- .../tdesign-mobile-react/src/drawer/type.ts | 4 ++-- .../tdesign-mobile-vue/src/drawer/drawer.md | 8 ++++---- .../tdesign-mobile-vue/src/drawer/props.ts | 4 ++-- .../tdesign-mobile-vue/src/drawer/type.ts | 4 ++-- .../tdesign-react/src/drawer/drawer.md | 4 ++-- .../products/tdesign-react/src/drawer/type.ts | 4 ++-- .../tdesign-vue-next/src/drawer/drawer.md | 8 ++++---- .../tdesign-vue-next/src/drawer/props.ts | 4 ++-- .../tdesign-vue-next/src/drawer/type.ts | 4 ++-- .../products/tdesign-vue/src/drawer/drawer.md | 8 ++++---- .../products/tdesign-vue/src/drawer/props.ts | 4 ++-- .../products/tdesign-vue/src/drawer/type.ts | 4 ++-- packages/scripts/api.json | 4 ++-- 16 files changed, 34 insertions(+), 38 deletions(-) diff --git a/db/TDesign.db b/db/TDesign.db index f43c7dc0b995aee692b14495a87bf32b81701379..3eec8e284407452cd132655e38b4fe973c6d7c28 100644 GIT binary patch delta 205 zcmZozVB4_3c7imc;6xc`RzU{6vaZII))dCp6sFb`=GGLJ))dy(6t>nB_N^%#i{ho) z82G*UrtyB})#LumRm)k+@sp#Ry_KDnt!=9!M?Bl~`ZNx9-kQ0>k}QmpjEWq*ywTHp z(l}Iwo^|bgy0PnB_N^%#i{ho~ z8Th^VrtyB})#LumRm)k+@sp#Ry_KDjt$wQ_M?Bl~`ZNyq>2(<#64RHaaR^UenZaQ> z{aqS|I7=hLT%qZIGdN_XtE6*?OxMliux!su=Kx|(Am##MZXo6XV&3g}>3ox3006Kn BGBf}H diff --git a/packages/products/tdesign-mobile-react/src/drawer/drawer.en-US.md b/packages/products/tdesign-mobile-react/src/drawer/drawer.en-US.md index 646daadc..0aa49bed 100644 --- a/packages/products/tdesign-mobile-react/src/drawer/drawer.en-US.md +++ b/packages/products/tdesign-mobile-react/src/drawer/drawer.en-US.md @@ -1,8 +1,6 @@ :: BASE_DOC :: ## API - - ### Drawer Props name | type | default | description | required diff --git a/packages/products/tdesign-mobile-react/src/drawer/drawer.md b/packages/products/tdesign-mobile-react/src/drawer/drawer.md index 8c4d3b50..938b2d03 100644 --- a/packages/products/tdesign-mobile-react/src/drawer/drawer.md +++ b/packages/products/tdesign-mobile-react/src/drawer/drawer.md @@ -1,8 +1,6 @@ :: BASE_DOC :: ## API - - ### Drawer Props 名称 | 类型 | 默认值 | 描述 | 必传 @@ -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`
对话框执行消失动画效果前触发 | N -onBeforeOpen | Function | | TS 类型:`() => void`
对话框执行弹出动画效果前触发 | N +onBeforeClose | Function | | TS 类型:`() => void`
抽屉执行关闭动画效果前触发 | N +onBeforeOpen | Function | | TS 类型:`() => void`
抽屉执行打开动画效果前触发 | N onClose | Function | | TS 类型:`(trigger: TriggerSource) => void`
关闭时触发。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/drawer/type.ts)。
`type TriggerSource = 'overlay'`
| N onItemClick | Function | | TS 类型:`( index: number, item: DrawerItem, context: { e: MouseEvent }) => void`
点击抽屉里的列表项 | N onOverlayClick | Function | | TS 类型:`(context: { e: MouseEvent }) => void`
如果蒙层存在,点击蒙层时触发 | N diff --git a/packages/products/tdesign-mobile-react/src/drawer/type.ts b/packages/products/tdesign-mobile-react/src/drawer/type.ts index 04f7d964..48953ac6 100644 --- a/packages/products/tdesign-mobile-react/src/drawer/type.ts +++ b/packages/products/tdesign-mobile-react/src/drawer/type.ts @@ -54,11 +54,11 @@ export interface TdDrawerProps { */ zIndex?: number; /** - * 对话框执行消失动画效果前触发 + * 抽屉执行关闭动画效果前触发 */ onBeforeClose?: () => void; /** - * 对话框执行弹出动画效果前触发 + * 抽屉执行打开动画效果前触发 */ onBeforeOpen?: () => void; /** diff --git a/packages/products/tdesign-mobile-vue/src/drawer/drawer.md b/packages/products/tdesign-mobile-vue/src/drawer/drawer.md index ac990661..053fb8dd 100644 --- a/packages/products/tdesign-mobile-vue/src/drawer/drawer.md +++ b/packages/products/tdesign-mobile-vue/src/drawer/drawer.md @@ -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`
对话框执行消失动画效果前触发 | N -onBeforeOpen | Function | | TS 类型:`() => void`
对话框执行弹出动画效果前触发 | N +onBeforeClose | Function | | TS 类型:`() => void`
抽屉执行关闭动画效果前触发 | N +onBeforeOpen | Function | | TS 类型:`() => void`
抽屉执行打开动画效果前触发 | N onClose | Function | | TS 类型:`(trigger: TriggerSource) => void`
关闭时触发。[详细类型定义](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/drawer/type.ts)。
`type TriggerSource = 'overlay'`
| N onItemClick | Function | | TS 类型:`( index: number, item: DrawerItem, context: { e: MouseEvent }) => void`
点击抽屉里的列表项 | N onOverlayClick | Function | | TS 类型:`(context: { e: MouseEvent }) => void`
如果蒙层存在,点击蒙层时触发 | N @@ -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)。
`type TriggerSource = 'overlay'`
item-click | `( index: number, item: DrawerItem, context: { e: MouseEvent })` | 点击抽屉里的列表项 overlay-click | `(context: { e: MouseEvent })` | 如果蒙层存在,点击蒙层时触发 diff --git a/packages/products/tdesign-mobile-vue/src/drawer/props.ts b/packages/products/tdesign-mobile-vue/src/drawer/props.ts index a5e9cd23..ea3ecf92 100644 --- a/packages/products/tdesign-mobile-vue/src/drawer/props.ts +++ b/packages/products/tdesign-mobile-vue/src/drawer/props.ts @@ -51,9 +51,9 @@ export default { zIndex: { type: Number, }, - /** 对话框执行消失动画效果前触发 */ + /** 抽屉执行关闭动画效果前触发 */ onBeforeClose: Function as PropType, - /** 对话框执行弹出动画效果前触发 */ + /** 抽屉执行打开动画效果前触发 */ onBeforeOpen: Function as PropType, /** 关闭时触发。[详细类型定义](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/drawer/type.ts)。
`type TriggerSource = 'overlay'`
*/ onClose: Function as PropType, diff --git a/packages/products/tdesign-mobile-vue/src/drawer/type.ts b/packages/products/tdesign-mobile-vue/src/drawer/type.ts index 30f371f6..b6674126 100644 --- a/packages/products/tdesign-mobile-vue/src/drawer/type.ts +++ b/packages/products/tdesign-mobile-vue/src/drawer/type.ts @@ -52,11 +52,11 @@ export interface TdDrawerProps { */ zIndex?: number; /** - * 对话框执行消失动画效果前触发 + * 抽屉执行关闭动画效果前触发 */ onBeforeClose?: () => void; /** - * 对话框执行弹出动画效果前触发 + * 抽屉执行打开动画效果前触发 */ onBeforeOpen?: () => void; /** diff --git a/packages/products/tdesign-react/src/drawer/drawer.md b/packages/products/tdesign-react/src/drawer/drawer.md index a3a38500..ad4d4659 100644 --- a/packages/products/tdesign-react/src/drawer/drawer.md +++ b/packages/products/tdesign-react/src/drawer/drawer.md @@ -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`
对话框执行消失动画效果前触发 | N -onBeforeOpen | Function | | TS 类型:`() => void`
对话框执行弹出动画效果前触发 | N +onBeforeClose | Function | | TS 类型:`() => void`
抽屉执行关闭动画效果前触发 | N +onBeforeOpen | Function | | TS 类型:`() => void`
抽屉执行打开动画效果前触发 | N onCancel | Function | | TS 类型:`(context: { e: MouseEvent }) => void`
如果“取消”按钮存在,点击“取消”按钮时触发,同时触发关闭事件 | N onClose | Function | | TS 类型:`(context: DrawerCloseContext) => void`
关闭事件,取消按钮点击时、关闭按钮点击时、ESC 按下时、点击蒙层时均会触发。[详细类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/drawer/type.ts)。
`type DrawerEventSource = 'esc' \| 'close-btn' \| 'cancel' \| 'overlay'`

`interface DrawerCloseContext { trigger: DrawerEventSource; e: MouseEvent \| KeyboardEvent }`
| N onCloseBtnClick | Function | | TS 类型:`(context: { e: MouseEvent }) => void`
如果关闭按钮存在,点击关闭按钮时触发该事件,同时触发关闭事件 | N diff --git a/packages/products/tdesign-react/src/drawer/type.ts b/packages/products/tdesign-react/src/drawer/type.ts index 3fe15a57..00d612c5 100644 --- a/packages/products/tdesign-react/src/drawer/type.ts +++ b/packages/products/tdesign-react/src/drawer/type.ts @@ -106,11 +106,11 @@ export interface TdDrawerProps { */ zIndex?: number; /** - * 对话框执行消失动画效果前触发 + * 抽屉执行关闭动画效果前触发 */ onBeforeClose?: () => void; /** - * 对话框执行弹出动画效果前触发 + * 抽屉执行打开动画效果前触发 */ onBeforeOpen?: () => void; /** diff --git a/packages/products/tdesign-vue-next/src/drawer/drawer.md b/packages/products/tdesign-vue-next/src/drawer/drawer.md index 04774ad0..7376f830 100644 --- a/packages/products/tdesign-vue-next/src/drawer/drawer.md +++ b/packages/products/tdesign-vue-next/src/drawer/drawer.md @@ -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`
对话框执行消失动画效果前触发 | N -onBeforeOpen | Function | | TS 类型:`() => void`
对话框执行弹出动画效果前触发 | N +onBeforeClose | Function | | TS 类型:`() => void`
抽屉执行关闭动画效果前触发 | N +onBeforeOpen | Function | | TS 类型:`() => void`
抽屉执行打开动画效果前触发 | N onCancel | Function | | TS 类型:`(context: { e: MouseEvent }) => void`
如果“取消”按钮存在,点击“取消”按钮时触发,同时触发关闭事件 | N onClose | Function | | TS 类型:`(context: DrawerCloseContext) => void`
关闭事件,取消按钮点击时、关闭按钮点击时、ESC 按下时、点击蒙层时均会触发。[详细类型定义](https://github.com/Tencent/tdesign-vue-next/tree/develop/src/drawer/type.ts)。
`type DrawerEventSource = 'esc' \| 'close-btn' \| 'cancel' \| 'overlay'`

`interface DrawerCloseContext { trigger: DrawerEventSource; e: MouseEvent \| KeyboardEvent }`
| N onCloseBtnClick | Function | | TS 类型:`(context: { e: MouseEvent }) => void`
如果关闭按钮存在,点击关闭按钮时触发该事件,同时触发关闭事件 | N @@ -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)。
`type DrawerEventSource = 'esc' \| 'close-btn' \| 'cancel' \| 'overlay'`

`interface DrawerCloseContext { trigger: DrawerEventSource; e: MouseEvent \| KeyboardEvent }`
close-btn-click | `(context: { e: MouseEvent })` | 如果关闭按钮存在,点击关闭按钮时触发该事件,同时触发关闭事件 diff --git a/packages/products/tdesign-vue-next/src/drawer/props.ts b/packages/products/tdesign-vue-next/src/drawer/props.ts index 6f8bc2e2..fe740f2e 100644 --- a/packages/products/tdesign-vue-next/src/drawer/props.ts +++ b/packages/products/tdesign-vue-next/src/drawer/props.ts @@ -100,9 +100,9 @@ export default { zIndex: { type: Number, }, - /** 对话框执行消失动画效果前触发 */ + /** 抽屉执行关闭动画效果前触发 */ onBeforeClose: Function as PropType, - /** 对话框执行弹出动画效果前触发 */ + /** 抽屉执行打开动画效果前触发 */ onBeforeOpen: Function as PropType, /** 如果“取消”按钮存在,点击“取消”按钮时触发,同时触发关闭事件 */ onCancel: Function as PropType, diff --git a/packages/products/tdesign-vue-next/src/drawer/type.ts b/packages/products/tdesign-vue-next/src/drawer/type.ts index 07f46cf0..bbec01c8 100644 --- a/packages/products/tdesign-vue-next/src/drawer/type.ts +++ b/packages/products/tdesign-vue-next/src/drawer/type.ts @@ -100,11 +100,11 @@ export interface TdDrawerProps { */ zIndex?: number; /** - * 对话框执行消失动画效果前触发 + * 抽屉执行关闭动画效果前触发 */ onBeforeClose?: () => void; /** - * 对话框执行弹出动画效果前触发 + * 抽屉执行打开动画效果前触发 */ onBeforeOpen?: () => void; /** diff --git a/packages/products/tdesign-vue/src/drawer/drawer.md b/packages/products/tdesign-vue/src/drawer/drawer.md index 4a0388ad..f6eccbe2 100644 --- a/packages/products/tdesign-vue/src/drawer/drawer.md +++ b/packages/products/tdesign-vue/src/drawer/drawer.md @@ -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`
对话框执行消失动画效果前触发 | N -onBeforeOpen | Function | | TS 类型:`() => void`
对话框执行弹出动画效果前触发 | N +onBeforeClose | Function | | TS 类型:`() => void`
抽屉执行关闭动画效果前触发 | N +onBeforeOpen | Function | | TS 类型:`() => void`
抽屉执行打开动画效果前触发 | N onCancel | Function | | TS 类型:`(context: { e: MouseEvent }) => void`
如果“取消”按钮存在,点击“取消”按钮时触发,同时触发关闭事件 | N onClose | Function | | TS 类型:`(context: DrawerCloseContext) => void`
关闭事件,取消按钮点击时、关闭按钮点击时、ESC 按下时、点击蒙层时均会触发。[详细类型定义](https://github.com/Tencent/tdesign-vue/tree/develop/src/drawer/type.ts)。
`type DrawerEventSource = 'esc' \| 'close-btn' \| 'cancel' \| 'overlay'`

`interface DrawerCloseContext { trigger: DrawerEventSource; e: MouseEvent \| KeyboardEvent }`
| N onCloseBtnClick | Function | | TS 类型:`(context: { e: MouseEvent }) => void`
如果关闭按钮存在,点击关闭按钮时触发该事件,同时触发关闭事件 | N @@ -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)。
`type DrawerEventSource = 'esc' \| 'close-btn' \| 'cancel' \| 'overlay'`

`interface DrawerCloseContext { trigger: DrawerEventSource; e: MouseEvent \| KeyboardEvent }`
close-btn-click | `(context: { e: MouseEvent })` | 如果关闭按钮存在,点击关闭按钮时触发该事件,同时触发关闭事件 diff --git a/packages/products/tdesign-vue/src/drawer/props.ts b/packages/products/tdesign-vue/src/drawer/props.ts index aa2744bd..936e64fc 100644 --- a/packages/products/tdesign-vue/src/drawer/props.ts +++ b/packages/products/tdesign-vue/src/drawer/props.ts @@ -100,9 +100,9 @@ export default { zIndex: { type: Number, }, - /** 对话框执行消失动画效果前触发 */ + /** 抽屉执行关闭动画效果前触发 */ onBeforeClose: Function as PropType, - /** 对话框执行弹出动画效果前触发 */ + /** 抽屉执行打开动画效果前触发 */ onBeforeOpen: Function as PropType, /** 如果“取消”按钮存在,点击“取消”按钮时触发,同时触发关闭事件 */ onCancel: Function as PropType, diff --git a/packages/products/tdesign-vue/src/drawer/type.ts b/packages/products/tdesign-vue/src/drawer/type.ts index 07f46cf0..bbec01c8 100644 --- a/packages/products/tdesign-vue/src/drawer/type.ts +++ b/packages/products/tdesign-vue/src/drawer/type.ts @@ -100,11 +100,11 @@ export interface TdDrawerProps { */ zIndex?: number; /** - * 对话框执行消失动画效果前触发 + * 抽屉执行关闭动画效果前触发 */ onBeforeClose?: () => void; /** - * 对话框执行弹出动画效果前触发 + * 抽屉执行打开动画效果前触发 */ onBeforeOpen?: () => void; /** diff --git a/packages/scripts/api.json b/packages/scripts/api.json index af3efe76..82b3ca0e 100644 --- a/packages/scripts/api.json +++ b/packages/scripts/api.json @@ -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": "", @@ -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": "",