diff --git a/packages/products/tdesign-react/src/dialog/defaultProps.ts b/packages/products/tdesign-react/src/dialog/defaultProps.ts index f849cf277..c1607a49e 100644 --- a/packages/products/tdesign-react/src/dialog/defaultProps.ts +++ b/packages/products/tdesign-react/src/dialog/defaultProps.ts @@ -12,6 +12,7 @@ export const dialogDefaultProps: TdDialogProps = { destroyOnClose: false, draggable: false, footer: true, + forceRender: false, header: true, mode: 'modal', placement: 'top', diff --git a/packages/products/tdesign-react/src/dialog/type.ts b/packages/products/tdesign-react/src/dialog/type.ts index 7adb71200..9c69b0610 100644 --- a/packages/products/tdesign-react/src/dialog/type.ts +++ b/packages/products/tdesign-react/src/dialog/type.ts @@ -70,6 +70,11 @@ export interface TdDialogProps { * @default true */ footer?: TNode; + /** + * 是否强制渲染Dialog + * @default false + */ + forceRender?: boolean; /** * 头部内容。值为 true 显示空白头部,值为 false 不显示任何内容,值类型为 string 则直接显示值,值类型为 Function 表示自定义头部内容 * @default true diff --git a/packages/products/tdesign-react/src/drawer/defaultProps.ts b/packages/products/tdesign-react/src/drawer/defaultProps.ts index cc28c017a..664c5407e 100644 --- a/packages/products/tdesign-react/src/drawer/defaultProps.ts +++ b/packages/products/tdesign-react/src/drawer/defaultProps.ts @@ -9,6 +9,7 @@ export const drawerDefaultProps: TdDrawerProps = { closeOnOverlayClick: undefined, destroyOnClose: false, footer: true, + forceRender: false, header: true, mode: 'overlay', placement: 'right', diff --git a/packages/products/tdesign-react/src/drawer/type.ts b/packages/products/tdesign-react/src/drawer/type.ts index 0dad5d6c9..1d9e57ddb 100644 --- a/packages/products/tdesign-react/src/drawer/type.ts +++ b/packages/products/tdesign-react/src/drawer/type.ts @@ -51,6 +51,11 @@ export interface TdDrawerProps { * @default true */ footer?: TNode; + /** + * 是否强制渲染Drawer + * @default false + */ + forceRender?: boolean; /** * 头部内容。值为 true 显示空白头部,值为 false 不显示头部,值类型为 string 则直接显示值,值类型为 TNode 表示自定义头部内容 * @default true