Skip to content
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
Expand Up @@ -11,6 +11,7 @@ export const drawerDefaultProps: TdDrawerProps = {
footer: true,
forceRender: false,
header: true,
lazy: false,
mode: 'overlay',
placement: 'right',
preventScrollThrough: true,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
:: BASE_DOC ::

## API

### Drawer Props

name | type | default | description | required
Expand All @@ -21,6 +20,7 @@ drawerClassName | String | - | \- | N
footer | TNode | true | Typescript:`boolean \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/packages/components/common.ts) | N
forceRender | Boolean | false | to force render Drawer | N
header | TNode | true | Typescript:`string \| boolean \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/packages/components/common.ts) | N
lazy | Boolean | false | Enable Drawer lazy loading, the contents of the Drawer are not rendered when enable | N
mode | String | overlay | options: overlay/push | N
placement | String | right | options: left/right/top/bottom | N
preventScrollThrough | Boolean | true | \- | N
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
:: BASE_DOC ::

## API

### Drawer Props

名称 | 类型 | 默认值 | 描述 | 必传
Expand All @@ -21,6 +20,7 @@ drawerClassName | String | - | 抽屉元素类名。 | N
footer | TNode | true | 底部操作栏,默认会有“确认”和“取消”两个按钮。值为 true 显示默认操作按钮,值为 false 或 null 不显示任何内容,值类型为 TNode 表示自定义底部内容。TS 类型:`boolean \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/packages/components/common.ts) | N
forceRender | Boolean | false | 是否强制渲染Drawer | N
header | TNode | true | 头部内容。值为 true 显示空白头部,值为 false 不显示头部,值类型为 string 则直接显示值,值类型为 TNode 表示自定义头部内容。TS 类型:`string \| boolean \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/packages/components/common.ts) | N
lazy | Boolean | false | 是否启用抽屉懒加载,启用时抽屉的内容不渲染 | N
mode | String | overlay | 展开方式,有两种:直接展示在内容上方 和 推开内容区域。可选项:overlay/push | N
placement | String | right | 抽屉方向。可选项:left/right/top/bottom | N
preventScrollThrough | Boolean | true | 防止滚动穿透 | N
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ export interface TdDrawerProps {
* @default true
*/
header?: TNode;
/**
* 是否启用抽屉懒加载,启用时抽屉的内容不渲染
* @default false
*/
lazy?: boolean;
/**
* 展开方式,有两种:直接展示在内容上方 和 推开内容区域
* @default overlay
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ destroyOnClose | Boolean | false | \- | N
drawerClassName | String | - | \- | N
footer | Boolean / Slot / Function | true | Typescript:`boolean \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-vue-next/blob/develop/packages/components/common.ts) | N
header | String / Boolean / Slot / Function | true | Typescript:`string \| boolean \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-vue-next/blob/develop/packages/components/common.ts) | N
lazy | Boolean | false | Enable Drawer lazy loading, the contents of the Drawer are not rendered when enable | N
mode | String | overlay | options: overlay/push | N
placement | String | right | options: left/right/top/bottom | N
preventScrollThrough | Boolean | true | \- | N
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ destroyOnClose | Boolean | false | 抽屉关闭时是否销毁节点 | N
drawerClassName | String | - | 抽屉元素类名。 | N
footer | Boolean / Slot / Function | true | 底部操作栏,默认会有“确认”和“取消”两个按钮。值为 true 显示默认操作按钮,值为 false 或 null 不显示任何内容,值类型为 TNode 表示自定义底部内容。TS 类型:`boolean \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue-next/blob/develop/packages/components/common.ts) | N
header | String / Boolean / Slot / Function | true | 头部内容。值为 true 显示空白头部,值为 false 不显示头部,值类型为 string 则直接显示值,值类型为 TNode 表示自定义头部内容。TS 类型:`string \| boolean \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue-next/blob/develop/packages/components/common.ts) | N
lazy | Boolean | false | 是否启用抽屉懒加载,启用时抽屉的内容不渲染 | N
mode | String | overlay | 展开方式,有两种:直接展示在内容上方 和 推开内容区域。可选项:overlay/push | N
placement | String | right | 抽屉方向。可选项:left/right/top/bottom | N
preventScrollThrough | Boolean | true | 防止滚动穿透 | N
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ export default {
type: [String, Boolean, Function] as PropType<TdDrawerProps['header']>,
default: true as TdDrawerProps['header'],
},
/** 是否启用抽屉懒加载,启用时抽屉的内容不渲染 */
lazy: Boolean,
/** 展开方式,有两种:直接展示在内容上方 和 推开内容区域 */
mode: {
type: String as PropType<TdDrawerProps['mode']>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ export interface TdDrawerProps {
* @default true
*/
header?: string | boolean | TNode;
/**
* 是否启用抽屉懒加载,启用时抽屉的内容不渲染
* @default false
*/
lazy?: boolean;
/**
* 展开方式,有两种:直接展示在内容上方 和 推开内容区域
* @default overlay
Expand Down
1 change: 1 addition & 0 deletions packages/products/tdesign-vue/src/drawer/drawer.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ destroyOnClose | Boolean | false | \- | N
drawerClassName | String | - | \- | N
footer | Boolean / Slot / Function | true | Typescript:`boolean \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N
header | String / Boolean / Slot / Function | true | Typescript:`string \| boolean \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N
lazy | Boolean | false | Enable Drawer lazy loading, the contents of the Drawer are not rendered when enable | N
mode | String | overlay | options: overlay/push | N
placement | String | right | options: left/right/top/bottom | N
preventScrollThrough | Boolean | true | \- | N
Expand Down
1 change: 1 addition & 0 deletions packages/products/tdesign-vue/src/drawer/drawer.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ destroyOnClose | Boolean | false | 抽屉关闭时是否销毁节点 | N
drawerClassName | String | - | 抽屉元素类名。 | N
footer | Boolean / Slot / Function | true | 底部操作栏,默认会有“确认”和“取消”两个按钮。值为 true 显示默认操作按钮,值为 false 或 null 不显示任何内容,值类型为 TNode 表示自定义底部内容。TS 类型:`boolean \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N
header | String / Boolean / Slot / Function | true | 头部内容。值为 true 显示空白头部,值为 false 不显示头部,值类型为 string 则直接显示值,值类型为 TNode 表示自定义头部内容。TS 类型:`string \| boolean \| TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N
lazy | Boolean | false | 是否启用抽屉懒加载,启用时抽屉的内容不渲染 | N
mode | String | overlay | 展开方式,有两种:直接展示在内容上方 和 推开内容区域。可选项:overlay/push | N
placement | String | right | 抽屉方向。可选项:left/right/top/bottom | N
preventScrollThrough | Boolean | true | 防止滚动穿透 | N
Expand Down
2 changes: 2 additions & 0 deletions packages/products/tdesign-vue/src/drawer/props.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ export default {
type: [String, Boolean, Function] as PropType<TdDrawerProps['header']>,
default: true,
},
/** 是否启用抽屉懒加载,启用时抽屉的内容不渲染 */
lazy: Boolean,
/** 展开方式,有两种:直接展示在内容上方 和 推开内容区域 */
mode: {
type: String as PropType<TdDrawerProps['mode']>,
Expand Down
5 changes: 5 additions & 0 deletions packages/products/tdesign-vue/src/drawer/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ export interface TdDrawerProps {
* @default true
*/
header?: string | boolean | TNode;
/**
* 是否启用抽屉懒加载,启用时抽屉的内容不渲染
* @default false
*/
lazy?: boolean;
/**
* 展开方式,有两种:直接展示在内容上方 和 推开内容区域
* @default overlay
Expand Down
41 changes: 41 additions & 0 deletions packages/scripts/api.json
Original file line number Diff line number Diff line change
Expand Up @@ -47011,6 +47011,47 @@
"Array"
]
},
{
"id": 1745545785,
"platform_framework": [
"1",
"2",
"4"
],
"component": "Drawer",
"field_category": 1,
"field_name": "lazy",
"field_type": [
"4"
],
"field_default_value": "false",
"field_enum": "",
"field_desc_zh": "是否启用抽屉懒加载,启用时抽屉的内容不渲染",
"field_desc_en": "Enable Drawer lazy loading, the contents of the Drawer are not rendered when enable",
"field_required": 0,
"event_input": "",
"create_time": "2025-04-25 01:49:45",
"update_time": "2025-04-25 01:49:45",
"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(PC)",
"React(PC)",
"Angular(PC)"
],
"field_type_text": [
"Boolean"
]
},
{
"id": 686,
"platform_framework": [
Expand Down