diff --git a/db/TDesign.db b/db/TDesign.db
index 53f27b87e..75627dd7a 100644
Binary files a/db/TDesign.db and b/db/TDesign.db differ
diff --git a/packages/products/tdesign-miniprogram/src/drawer/README.en-US.md b/packages/products/tdesign-miniprogram/src/drawer/README.en-US.md
index 2556b543f..46cc756cc 100644
--- a/packages/products/tdesign-miniprogram/src/drawer/README.en-US.md
+++ b/packages/products/tdesign-miniprogram/src/drawer/README.en-US.md
@@ -8,10 +8,10 @@ name | type | default | description | required
-- | -- | -- | -- | --
style | Object | - | CSS(Cascading Style Sheets) | N
custom-style | Object | - | CSS(Cascading Style Sheets),used to set style on virtual component | N
-close-on-overlay-click | Boolean | true | \- | N
+close-on-overlay-click | Boolean | undefined | \- | N
destroy-on-close | Boolean | false | \- | N
footer | Slot | - | `0.29.0`。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N
-items | Array | - | Typescript:`DrawerItem[] ` `interface DrawerItem { title: string; icon: string; }。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/drawer/type.ts)`。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/drawer/type.ts) | N
+items | Array | - | Typescript:`DrawerItem[]` `interface DrawerItem { title: string; icon: string; }`。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/drawer/type.ts) | N
placement | String | right | options: left/right | N
show-overlay | Boolean | true | \- | N
title | String / Slot | - | `0.29.0`。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N
@@ -23,6 +23,6 @@ z-index | Number | 11500 | \- | N
name | params | description
-- | -- | --
-close | `(trigger: TriggerSource)` | \-
+close | `(trigger: DrawerTriggerSource)` | [see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/drawer/type.ts)。
`type DrawerTriggerSource = 'overlay'`
item-click | `(index: number; item: DrawerItem)` | \-
overlay-click | \- | \-
diff --git a/packages/products/tdesign-miniprogram/src/drawer/README.md b/packages/products/tdesign-miniprogram/src/drawer/README.md
index f2e8a9fed..38ac60653 100644
--- a/packages/products/tdesign-miniprogram/src/drawer/README.md
+++ b/packages/products/tdesign-miniprogram/src/drawer/README.md
@@ -8,10 +8,10 @@
-- | -- | -- | -- | --
style | Object | - | 样式 | N
custom-style | Object | - | 样式,一般用于开启虚拟化组件节点场景 | N
-close-on-overlay-click | Boolean | true | 点击蒙层时是否触发抽屉关闭事件 | N
+close-on-overlay-click | Boolean | undefined | 点击蒙层时是否触发抽屉关闭事件 | N
destroy-on-close | Boolean | false | 抽屉关闭时是否销毁节点 | N
footer | Slot | - | `0.29.0`。抽屉的底部。[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N
-items | Array | - | 抽屉里的列表项。TS 类型:`DrawerItem[] ` `interface DrawerItem { title: string; icon: string; }。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/drawer/type.ts)`。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/drawer/type.ts) | N
+items | Array | - | 抽屉里的列表项。TS 类型:`DrawerItem[]` `interface DrawerItem { title: string; icon: string; }`。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/drawer/type.ts) | N
placement | String | right | 抽屉方向。可选项:left/right | N
show-overlay | Boolean | true | 是否显示遮罩层 | N
title | String / Slot | - | `0.29.0`。抽屉的标题。[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N
@@ -23,6 +23,6 @@ z-index | Number | 11500 | 抽屉层级,样式默认为 11500 | N
名称 | 参数 | 描述
-- | -- | --
-close | `(trigger: TriggerSource)` | 关闭时触发。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/drawer/type.ts)。
`type TriggerSource = 'overlay'`
+close | `(trigger: DrawerTriggerSource)` | 关闭时触发。。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/drawer/type.ts)。
`type DrawerTriggerSource = 'overlay'`
item-click | `(index: number; item: DrawerItem)` | 点击抽屉里的列表项
overlay-click | \- | 如果蒙层存在,点击蒙层时触发
diff --git a/packages/products/tdesign-miniprogram/src/drawer/props.ts b/packages/products/tdesign-miniprogram/src/drawer/props.ts
index 5932ffdc7..4bbf1d0df 100644
--- a/packages/products/tdesign-miniprogram/src/drawer/props.ts
+++ b/packages/products/tdesign-miniprogram/src/drawer/props.ts
@@ -8,8 +8,8 @@ import { TdDrawerProps } from './type';
const props: TdDrawerProps = {
/** 点击蒙层时是否触发抽屉关闭事件 */
closeOnOverlayClick: {
- type: Boolean,
- value: true,
+ type: null,
+ value: undefined,
},
/** 抽屉关闭时是否销毁节点 */
destroyOnClose: {
diff --git a/packages/products/tdesign-miniprogram/src/drawer/type.ts b/packages/products/tdesign-miniprogram/src/drawer/type.ts
index 9e2b017cc..0bef0eac7 100644
--- a/packages/products/tdesign-miniprogram/src/drawer/type.ts
+++ b/packages/products/tdesign-miniprogram/src/drawer/type.ts
@@ -4,4 +4,79 @@
* 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC
* */
-[object Object]
\ No newline at end of file
+export interface TdDrawerProps {
+ /**
+ * 点击蒙层时是否触发抽屉关闭事件
+ */
+ closeOnOverlayClick?: {
+ type: BooleanConstructor;
+ value?: boolean;
+ };
+ /**
+ * 抽屉关闭时是否销毁节点
+ * @default false
+ */
+ destroyOnClose?: {
+ type: BooleanConstructor;
+ value?: boolean;
+ };
+ /**
+ * 抽屉里的列表项
+ */
+ items?: {
+ type: ArrayConstructor;
+ value?: DrawerItem[];
+ };
+ /**
+ * 抽屉方向
+ * @default right
+ */
+ placement?: {
+ type: StringConstructor;
+ value?: 'left' | 'right';
+ };
+ /**
+ * 是否显示遮罩层
+ * @default true
+ */
+ showOverlay?: {
+ type: BooleanConstructor;
+ value?: boolean;
+ };
+ /**
+ * 抽屉的标题
+ */
+ title?: {
+ type: StringConstructor;
+ value?: string;
+ };
+ /**
+ * 是否使用了自定义导航栏
+ * @default false
+ */
+ usingCustomNavbar?: {
+ type: BooleanConstructor;
+ value?: boolean;
+ };
+ /**
+ * 组件是否可见
+ * @default false
+ */
+ visible?: {
+ type: BooleanConstructor;
+ value?: boolean;
+ };
+ /**
+ * 抽屉层级,样式默认为 11500
+ * @default 11500
+ */
+ zIndex?: {
+ type: NumberConstructor;
+ value?: number;
+ };
+}
+
+export interface DrawerItem {
+ title: string;
+ icon: string;
+}
diff --git a/packages/products/tdesign-mobile-react/src/drawer/defaultProps.ts b/packages/products/tdesign-mobile-react/src/drawer/defaultProps.ts
index 32cc7dd18..43f5d94fc 100644
--- a/packages/products/tdesign-mobile-react/src/drawer/defaultProps.ts
+++ b/packages/products/tdesign-mobile-react/src/drawer/defaultProps.ts
@@ -5,7 +5,7 @@
import { TdDrawerProps } from './type';
export const drawerDefaultProps: TdDrawerProps = {
- closeOnOverlayClick: true,
+ closeOnOverlayClick: undefined,
destroyOnClose: false,
placement: 'right',
showOverlay: true,
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 0aa49bed9..eedea02a4 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,6 +1,7 @@
:: BASE_DOC ::
## API
+
### Drawer Props
name | type | default | description | required
@@ -8,10 +9,10 @@ name | type | default | description | required
className | String | - | className of component | N
style | Object | - | CSS(Cascading Style Sheets),Typescript:`React.CSSProperties` | N
attach | String / Function | - | Typescript:`AttachNode`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-react/blob/develop/src/common.ts) | N
-closeOnOverlayClick | Boolean | true | \- | N
+closeOnOverlayClick | Boolean | undefined | \- | N
destroyOnClose | Boolean | false | \- | N
footer | TElement | - | Typescript:`TNode`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-react/blob/develop/src/common.ts) | N
-items | Array | - | Typescript:`DrawerItem[] ` `interface DrawerItem { title: string; icon: TNode; }`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-react/blob/develop/src/common.ts)。[see more ts definition](https://github.com/Tencent/tdesign-mobile-react/tree/develop/src/drawer/type.ts) | N
+items | Array | - | Typescript:`DrawerItem[] ` `interface DrawerItem { title: string; icon?: TNode; }`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-react/blob/develop/src/common.ts)。[see more ts definition](https://github.com/Tencent/tdesign-mobile-react/tree/develop/src/drawer/type.ts) | N
placement | String | right | options: left/right | N
showOverlay | Boolean | true | \- | N
title | TNode | - | Typescript:`string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-react/blob/develop/src/common.ts) | N
@@ -19,7 +20,7 @@ visible | Boolean | false | \- | N
zIndex | Number | - | \- | N
onBeforeClose | Function | | Typescript:`() => void`
| N
onBeforeOpen | Function | | Typescript:`() => void`
| N
-onClose | Function | | Typescript:`(trigger: TriggerSource) => void`
| N
+onClose | Function | | Typescript:`(trigger: DrawerTriggerSource) => void`
[see more ts definition](https://github.com/Tencent/tdesign-mobile-react/tree/develop/src/drawer/type.ts)。
`type DrawerTriggerSource = 'overlay'`
| N
onItemClick | Function | | Typescript:`( index: number, item: DrawerItem, context: { e: MouseEvent }) => void`
| N
onOverlayClick | Function | | Typescript:`(context: { e: MouseEvent }) => void`
| N
diff --git a/packages/products/tdesign-mobile-react/src/drawer/drawer.md b/packages/products/tdesign-mobile-react/src/drawer/drawer.md
index 938b2d034..e75624902 100644
--- a/packages/products/tdesign-mobile-react/src/drawer/drawer.md
+++ b/packages/products/tdesign-mobile-react/src/drawer/drawer.md
@@ -1,6 +1,7 @@
:: BASE_DOC ::
## API
+
### Drawer Props
名称 | 类型 | 默认值 | 描述 | 必传
@@ -8,10 +9,10 @@
className | String | - | 类名 | N
style | Object | - | 样式,TS 类型:`React.CSSProperties` | N
attach | String / Function | - | 抽屉挂载的节点,默认挂在组件本身的位置。数据类型为 String 时,会被当作选择器处理,进行节点查询。示例:'body' 或 () => document.body。TS 类型:`AttachNode`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-react/blob/develop/src/common.ts) | N
-closeOnOverlayClick | Boolean | true | 点击蒙层时是否触发抽屉关闭事件 | N
+closeOnOverlayClick | Boolean | undefined | 点击蒙层时是否触发抽屉关闭事件 | N
destroyOnClose | Boolean | false | 抽屉关闭时是否销毁节点 | N
footer | TElement | - | 抽屉的底部。TS 类型:`TNode`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-react/blob/develop/src/common.ts) | N
-items | Array | - | 抽屉里的列表项。TS 类型:`DrawerItem[] ` `interface DrawerItem { title: string; icon: TNode; }`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-react/blob/develop/src/common.ts)。[详细类型定义](https://github.com/Tencent/tdesign-mobile-react/tree/develop/src/drawer/type.ts) | N
+items | Array | - | 抽屉里的列表项。TS 类型:`DrawerItem[] ` `interface DrawerItem { title: string; icon?: TNode; }`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-react/blob/develop/src/common.ts)。[详细类型定义](https://github.com/Tencent/tdesign-mobile-react/tree/develop/src/drawer/type.ts) | N
placement | String | right | 抽屉方向。可选项:left/right | N
showOverlay | Boolean | true | 是否显示遮罩层 | N
title | TNode | - | 抽屉的标题。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-react/blob/develop/src/common.ts) | N
@@ -19,7 +20,7 @@ visible | Boolean | false | 组件是否可见 | N
zIndex | Number | - | 抽屉层级,样式默认为 1500 | 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
+onClose | Function | | TS 类型:`(trigger: DrawerTriggerSource) => void`
关闭时触发。。[详细类型定义](https://github.com/Tencent/tdesign-mobile-react/tree/develop/src/drawer/type.ts)。
`type DrawerTriggerSource = '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 48953ac6f..80533e531 100644
--- a/packages/products/tdesign-mobile-react/src/drawer/type.ts
+++ b/packages/products/tdesign-mobile-react/src/drawer/type.ts
@@ -14,7 +14,6 @@ export interface TdDrawerProps {
attach?: AttachNode;
/**
* 点击蒙层时是否触发抽屉关闭事件
- * @default true
*/
closeOnOverlayClick?: boolean;
/**
@@ -62,9 +61,9 @@ export interface TdDrawerProps {
*/
onBeforeOpen?: () => void;
/**
- * 关闭时触发。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/drawer/type.ts)。
`type TriggerSource = 'overlay'`
+ * 关闭时触发。
*/
- onClose?: (trigger: TriggerSource) => void;
+ onClose?: (trigger: DrawerTriggerSource) => void;
/**
* 点击抽屉里的列表项
*/
@@ -108,7 +107,9 @@ export interface DrawerInstance {
export interface DrawerItem {
title: string;
- icon: TNode;
+ icon?: TNode;
}
+export type DrawerTriggerSource = 'overlay';
+
export type DrawerMethod = (options?: DrawerOptions) => void;
diff --git a/packages/products/tdesign-mobile-vue/src/drawer/drawer.en-US.md b/packages/products/tdesign-mobile-vue/src/drawer/drawer.en-US.md
index 5f5e27478..fdb5f1f33 100644
--- a/packages/products/tdesign-mobile-vue/src/drawer/drawer.en-US.md
+++ b/packages/products/tdesign-mobile-vue/src/drawer/drawer.en-US.md
@@ -1,6 +1,7 @@
:: BASE_DOC ::
## API
+
### Drawer Props
name | type | default | description | required
@@ -9,7 +10,7 @@ attach | String / Function | - | Typescript:`AttachNode`。[see more ts defini
closeOnOverlayClick | Boolean | undefined | \- | N
destroyOnClose | Boolean | false | \- | N
footer | Slot / Function | - | Typescript:`TNode`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N
-items | Array | - | Typescript:`DrawerItem[] ` `interface DrawerItem { title: string; icon: TNode; }`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts)。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/drawer/type.ts) | N
+items | Array | - | Typescript:`DrawerItem[] ` `interface DrawerItem { title: string; icon?: TNode; }`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts)。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/drawer/type.ts) | N
placement | String | right | options: left/right | N
showOverlay | Boolean | true | \- | N
title | String / Slot / Function | - | Typescript:`string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N
@@ -17,7 +18,7 @@ visible | Boolean | false | \- | N
zIndex | Number | - | \- | N
onBeforeClose | Function | | Typescript:`() => void`
| N
onBeforeOpen | Function | | Typescript:`() => void`
| N
-onClose | Function | | Typescript:`(trigger: TriggerSource) => void`
| N
+onClose | Function | | Typescript:`(trigger: DrawerTriggerSource) => void`
[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/drawer/type.ts)。
`type DrawerTriggerSource = 'overlay'`
| N
onItemClick | Function | | Typescript:`( index: number, item: DrawerItem, context: { e: MouseEvent }) => void`
| N
onOverlayClick | Function | | Typescript:`(context: { e: MouseEvent }) => void`
| N
@@ -27,7 +28,7 @@ name | params | description
-- | -- | --
before-close | \- | \-
before-open | \- | \-
-close | `(trigger: TriggerSource)` | \-
+close | `(trigger: DrawerTriggerSource)` | [see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/drawer/type.ts)。
`type DrawerTriggerSource = '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/drawer.md b/packages/products/tdesign-mobile-vue/src/drawer/drawer.md
index 053fb8dd4..575b2f004 100644
--- a/packages/products/tdesign-mobile-vue/src/drawer/drawer.md
+++ b/packages/products/tdesign-mobile-vue/src/drawer/drawer.md
@@ -1,6 +1,7 @@
:: BASE_DOC ::
## API
+
### Drawer Props
名称 | 类型 | 默认值 | 描述 | 必传
@@ -9,7 +10,7 @@ attach | String / Function | - | 抽屉挂载的节点,默认挂在组件本
closeOnOverlayClick | Boolean | undefined | 点击蒙层时是否触发抽屉关闭事件 | N
destroyOnClose | Boolean | false | 抽屉关闭时是否销毁节点 | N
footer | Slot / Function | - | 抽屉的底部。TS 类型:`TNode`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N
-items | Array | - | 抽屉里的列表项。TS 类型:`DrawerItem[] ` `interface DrawerItem { title: string; icon: TNode; }`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts)。[详细类型定义](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/drawer/type.ts) | N
+items | Array | - | 抽屉里的列表项。TS 类型:`DrawerItem[] ` `interface DrawerItem { title: string; icon?: TNode; }`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts)。[详细类型定义](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/drawer/type.ts) | N
placement | String | right | 抽屉方向。可选项:left/right | N
showOverlay | Boolean | true | 是否显示遮罩层 | N
title | String / Slot / Function | - | 抽屉的标题。TS 类型:`string \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N
@@ -17,7 +18,7 @@ visible | Boolean | false | 组件是否可见 | N
zIndex | Number | - | 抽屉层级,样式默认为 1500 | 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
+onClose | Function | | TS 类型:`(trigger: DrawerTriggerSource) => void`
关闭时触发。。[详细类型定义](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/drawer/type.ts)。
`type DrawerTriggerSource = 'overlay'`
| N
onItemClick | Function | | TS 类型:`( index: number, item: DrawerItem, context: { e: MouseEvent }) => void`
点击抽屉里的列表项 | N
onOverlayClick | Function | | TS 类型:`(context: { e: MouseEvent }) => void`
如果蒙层存在,点击蒙层时触发 | N
@@ -27,7 +28,7 @@ onOverlayClick | Function | | TS 类型:`(context: { e: MouseEvent }) => void
-- | -- | --
before-close | \- | 抽屉执行关闭动画效果前触发
before-open | \- | 抽屉执行打开动画效果前触发
-close | `(trigger: TriggerSource)` | 关闭时触发。[详细类型定义](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/drawer/type.ts)。
`type TriggerSource = 'overlay'`
+close | `(trigger: DrawerTriggerSource)` | 关闭时触发。。[详细类型定义](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/drawer/type.ts)。
`type DrawerTriggerSource = '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 ea3ecf925..4dd9f54df 100644
--- a/packages/products/tdesign-mobile-vue/src/drawer/props.ts
+++ b/packages/products/tdesign-mobile-vue/src/drawer/props.ts
@@ -55,7 +55,7 @@ export default {
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,
/** 点击抽屉里的列表项 */
onItemClick: 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 b66741266..babf5d68b 100644
--- a/packages/products/tdesign-mobile-vue/src/drawer/type.ts
+++ b/packages/products/tdesign-mobile-vue/src/drawer/type.ts
@@ -60,9 +60,9 @@ export interface TdDrawerProps {
*/
onBeforeOpen?: () => void;
/**
- * 关闭时触发。[详细类型定义](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/drawer/type.ts)。
`type TriggerSource = 'overlay'`
+ * 关闭时触发。
*/
- onClose?: (trigger: TriggerSource) => void;
+ onClose?: (trigger: DrawerTriggerSource) => void;
/**
* 点击抽屉里的列表项
*/
@@ -106,7 +106,9 @@ export interface DrawerInstance {
export interface DrawerItem {
title: string;
- icon: TNode;
+ icon?: TNode;
}
+export type DrawerTriggerSource = 'overlay';
+
export type DrawerMethod = (options?: DrawerOptions) => void;
diff --git a/packages/products/tdesign-react/src/drawer/defaultProps.ts b/packages/products/tdesign-react/src/drawer/defaultProps.ts
index 9f12ce8da..664c5407e 100644
--- a/packages/products/tdesign-react/src/drawer/defaultProps.ts
+++ b/packages/products/tdesign-react/src/drawer/defaultProps.ts
@@ -6,7 +6,7 @@ import { TdDrawerProps } from './type';
export const drawerDefaultProps: TdDrawerProps = {
closeOnEscKeydown: undefined,
- closeOnOverlayClick: true,
+ closeOnOverlayClick: undefined,
destroyOnClose: false,
footer: true,
forceRender: false,
diff --git a/packages/products/tdesign-react/src/drawer/drawer.en-US.md b/packages/products/tdesign-react/src/drawer/drawer.en-US.md
index 305b3ffed..c1ea50ce4 100644
--- a/packages/products/tdesign-react/src/drawer/drawer.en-US.md
+++ b/packages/products/tdesign-react/src/drawer/drawer.en-US.md
@@ -1,6 +1,7 @@
:: BASE_DOC ::
## API
+
### Drawer Props
name | type | default | description | required
diff --git a/packages/products/tdesign-react/src/drawer/drawer.md b/packages/products/tdesign-react/src/drawer/drawer.md
index ad4d4659a..e405b9e51 100644
--- a/packages/products/tdesign-react/src/drawer/drawer.md
+++ b/packages/products/tdesign-react/src/drawer/drawer.md
@@ -1,6 +1,7 @@
:: BASE_DOC ::
## API
+
### Drawer Props
名称 | 类型 | 默认值 | 描述 | 必传
diff --git a/packages/products/tdesign-react/src/drawer/type.ts b/packages/products/tdesign-react/src/drawer/type.ts
index 00d612c50..9364f129b 100644
--- a/packages/products/tdesign-react/src/drawer/type.ts
+++ b/packages/products/tdesign-react/src/drawer/type.ts
@@ -35,7 +35,6 @@ export interface TdDrawerProps {
closeOnEscKeydown?: boolean;
/**
* 点击蒙层时是否触发抽屉关闭事件
- * @default true
*/
closeOnOverlayClick?: boolean;
/**
diff --git a/packages/products/tdesign-vue-next/src/drawer/drawer.en-US.md b/packages/products/tdesign-vue-next/src/drawer/drawer.en-US.md
index 089997b7d..658591454 100644
--- a/packages/products/tdesign-vue-next/src/drawer/drawer.en-US.md
+++ b/packages/products/tdesign-vue-next/src/drawer/drawer.en-US.md
@@ -1,6 +1,7 @@
:: BASE_DOC ::
## API
+
### Drawer Props
name | type | default | description | required
diff --git a/packages/products/tdesign-vue-next/src/drawer/drawer.md b/packages/products/tdesign-vue-next/src/drawer/drawer.md
index 7376f8304..24dd9f467 100644
--- a/packages/products/tdesign-vue-next/src/drawer/drawer.md
+++ b/packages/products/tdesign-vue-next/src/drawer/drawer.md
@@ -37,6 +37,7 @@
如果您不确定问题是否是由该规则引起的,或者确定该规则不是问题的根本原因,请在 `GitHub` 上提出一个 `issue`,并提供可以重现问题的代码。这将有助于我们更好地了解您的问题并提供更好的帮助。
## API
+
### Drawer Props
名称 | 类型 | 默认值 | 描述 | 必传
diff --git a/packages/products/tdesign-vue-next/src/drawer/props.ts b/packages/products/tdesign-vue-next/src/drawer/props.ts
index fe740f2e4..39e652774 100644
--- a/packages/products/tdesign-vue-next/src/drawer/props.ts
+++ b/packages/products/tdesign-vue-next/src/drawer/props.ts
@@ -32,7 +32,7 @@ export default {
/** 点击蒙层时是否触发抽屉关闭事件 */
closeOnOverlayClick: {
type: Boolean,
- default: true,
+ default: undefined,
},
/** 确认按钮。值类型为字符串,则表示自定义按钮文本,值类型为 Object 则表示透传 Button 组件属性。使用 TNode 自定义按钮时,需自行控制确认事件 */
confirmBtn: {
diff --git a/packages/products/tdesign-vue-next/src/drawer/type.ts b/packages/products/tdesign-vue-next/src/drawer/type.ts
index bbec01c84..022e5bafa 100644
--- a/packages/products/tdesign-vue-next/src/drawer/type.ts
+++ b/packages/products/tdesign-vue-next/src/drawer/type.ts
@@ -30,7 +30,6 @@ export interface TdDrawerProps {
closeOnEscKeydown?: boolean;
/**
* 点击蒙层时是否触发抽屉关闭事件
- * @default true
*/
closeOnOverlayClick?: boolean;
/**
diff --git a/packages/products/tdesign-vue/src/drawer/drawer.en-US.md b/packages/products/tdesign-vue/src/drawer/drawer.en-US.md
index 4e98b2f18..708a490a4 100644
--- a/packages/products/tdesign-vue/src/drawer/drawer.en-US.md
+++ b/packages/products/tdesign-vue/src/drawer/drawer.en-US.md
@@ -1,6 +1,7 @@
:: BASE_DOC ::
## API
+
### Drawer Props
name | type | default | description | required
diff --git a/packages/products/tdesign-vue/src/drawer/drawer.md b/packages/products/tdesign-vue/src/drawer/drawer.md
index f6eccbe2f..332101b38 100644
--- a/packages/products/tdesign-vue/src/drawer/drawer.md
+++ b/packages/products/tdesign-vue/src/drawer/drawer.md
@@ -1,6 +1,7 @@
:: BASE_DOC ::
## API
+
### Drawer Props
名称 | 类型 | 默认值 | 描述 | 必传
diff --git a/packages/products/tdesign-vue/src/drawer/props.ts b/packages/products/tdesign-vue/src/drawer/props.ts
index 936e64fcd..3c592e31f 100644
--- a/packages/products/tdesign-vue/src/drawer/props.ts
+++ b/packages/products/tdesign-vue/src/drawer/props.ts
@@ -32,7 +32,7 @@ export default {
/** 点击蒙层时是否触发抽屉关闭事件 */
closeOnOverlayClick: {
type: Boolean,
- default: true,
+ default: undefined,
},
/** 确认按钮。值类型为字符串,则表示自定义按钮文本,值类型为 Object 则表示透传 Button 组件属性。使用 TNode 自定义按钮时,需自行控制确认事件 */
confirmBtn: {
diff --git a/packages/products/tdesign-vue/src/drawer/type.ts b/packages/products/tdesign-vue/src/drawer/type.ts
index bbec01c84..022e5bafa 100644
--- a/packages/products/tdesign-vue/src/drawer/type.ts
+++ b/packages/products/tdesign-vue/src/drawer/type.ts
@@ -30,7 +30,6 @@ export interface TdDrawerProps {
closeOnEscKeydown?: boolean;
/**
* 点击蒙层时是否触发抽屉关闭事件
- * @default true
*/
closeOnOverlayClick?: boolean;
/**
diff --git a/packages/scripts/api.json b/packages/scripts/api.json
index 48c2e5836..877304dd0 100644
--- a/packages/scripts/api.json
+++ b/packages/scripts/api.json
@@ -42358,6 +42358,7 @@
"1",
"2",
"4",
+ "8",
"16",
"32",
"64"
@@ -42368,7 +42369,7 @@
"field_type": [
"4"
],
- "field_default_value": "true",
+ "field_default_value": "undefined",
"field_enum": "",
"field_desc_zh": "点击蒙层时是否触发抽屉关闭事件",
"field_desc_en": null,
@@ -42391,6 +42392,7 @@
"Vue(PC)",
"React(PC)",
"Angular(PC)",
+ "Vue(Mobile)",
"React(Mobile)",
"Angular(Mobile)",
"Miniprogram"
@@ -42399,43 +42401,6 @@
"Boolean"
]
},
- {
- "id": 1712581243,
- "platform_framework": [
- "8"
- ],
- "component": "Drawer",
- "field_category": 1,
- "field_name": "closeOnOverlayClick",
- "field_type": [
- "4"
- ],
- "field_default_value": "undefined",
- "field_enum": "",
- "field_desc_zh": "点击蒙层时是否触发抽屉关闭事件",
- "field_desc_en": null,
- "field_required": 0,
- "event_input": "",
- "create_time": "2024-04-08 13:00:43",
- "update_time": "2024-04-08 13:00:43",
- "event_output": null,
- "custom_field_type": null,
- "syntactic_sugar": null,
- "readonly": 1,
- "html_attribute": 0,
- "trigger_elements": "",
- "deprecated": 0,
- "version": "",
- "test_description": null,
- "support_default_value": 0,
- "field_category_text": "Props",
- "platform_framework_text": [
- "Vue(Mobile)"
- ],
- "field_type_text": [
- "Boolean"
- ]
- },
{
"id": 1062,
"platform_framework": [
@@ -42759,7 +42724,7 @@
"create_time": "2022-03-31 03:39:31",
"update_time": "2022-06-16 08:09:43",
"event_output": null,
- "custom_field_type": "DrawerItem[] 【interface DrawerItem { title: string; icon: TNode; }】",
+ "custom_field_type": "DrawerItem[] 【interface DrawerItem { title: string; icon?: TNode; }】",
"syntactic_sugar": null,
"readonly": 1,
"html_attribute": 0,
@@ -42798,7 +42763,7 @@
"create_time": "2023-02-28 12:04:36",
"update_time": "2023-02-28 12:04:36",
"event_output": null,
- "custom_field_type": "DrawerItem[] 【interface DrawerItem { title: string; icon: string; }】。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/drawer/type.ts)",
+ "custom_field_type": "DrawerItem[]【interface DrawerItem { title: string; icon: string; }】",
"syntactic_sugar": null,
"readonly": 1,
"html_attribute": 0,
@@ -43533,6 +43498,7 @@
{
"id": 2545,
"platform_framework": [
+ "8",
"16",
"32",
"64"
@@ -43543,10 +43509,10 @@
"field_type": [],
"field_default_value": "",
"field_enum": "",
- "field_desc_zh": "关闭时触发。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/drawer/type.ts)。
`type TriggerSource = 'overlay'`
",
+ "field_desc_zh": "关闭时触发。",
"field_desc_en": null,
"field_required": 0,
- "event_input": "(trigger: TriggerSource)",
+ "event_input": "(trigger: DrawerTriggerSource)【type DrawerTriggerSource = 'overlay'】",
"create_time": "2022-04-06 08:50:33",
"update_time": "2022-04-06 08:50:33",
"event_output": null,
@@ -43561,45 +43527,13 @@
"support_default_value": 0,
"field_category_text": "Events",
"platform_framework_text": [
+ "Vue(Mobile)",
"React(Mobile)",
"Angular(Mobile)",
"Miniprogram"
],
"field_type_text": []
},
- {
- "id": 1712579200,
- "platform_framework": [
- "8"
- ],
- "component": "Drawer",
- "field_category": 2,
- "field_name": "close",
- "field_type": [],
- "field_default_value": "",
- "field_enum": "",
- "field_desc_zh": "关闭时触发。[详细类型定义](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/drawer/type.ts)。
`type TriggerSource = 'overlay'`
",
- "field_desc_en": null,
- "field_required": 0,
- "event_input": "(trigger: TriggerSource)",
- "create_time": "2024-04-08 12:26:40",
- "update_time": "2024-04-08 12:26:40",
- "event_output": null,
- "custom_field_type": null,
- "syntactic_sugar": null,
- "readonly": 1,
- "html_attribute": 0,
- "trigger_elements": "",
- "deprecated": 0,
- "version": "",
- "test_description": null,
- "support_default_value": 0,
- "field_category_text": "Events",
- "platform_framework_text": [
- "Vue(Mobile)"
- ],
- "field_type_text": []
- },
{
"id": 700,
"platform_framework": [