From 174a9712cbd841220463879a65afcfed71f80d6b Mon Sep 17 00:00:00 2001 From: Guo Yunhe Date: Fri, 18 Mar 2022 11:05:57 +0800 Subject: [PATCH] fix(Dialog): height type can be either number or string (#3807) --- src/dialog/dialog.jsx | 2 +- types/dialog/index.d.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dialog/dialog.jsx b/src/dialog/dialog.jsx index 9f0107ca2b..20c8ffed7b 100644 --- a/src/dialog/dialog.jsx +++ b/src/dialog/dialog.jsx @@ -132,7 +132,7 @@ export default class Dialog extends Component { /** * 对话框的高度样式属性 */ - height: PropTypes.string, + height: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), /** * 开启 v2 版本弹窗 */ diff --git a/types/dialog/index.d.ts b/types/dialog/index.d.ts index f3eca037d2..37f0ae3e3c 100644 --- a/types/dialog/index.d.ts +++ b/types/dialog/index.d.ts @@ -152,7 +152,7 @@ export interface DialogProps extends HTMLAttributesWeak, CommonProps { /** * 对话框的高度样式属性 */ - height?: string; + height?: string | number; popupContainer?: string | HTMLElement | ((target: HTMLElement) => HTMLElement); /** * 开启 v2 版本弹窗