Skip to content

Commit 174a971

Browse files
authored
fix(Dialog): height type can be either number or string (#3807)
1 parent c057724 commit 174a971

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/dialog/dialog.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ export default class Dialog extends Component {
132132
/**
133133
* 对话框的高度样式属性
134134
*/
135-
height: PropTypes.string,
135+
height: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
136136
/**
137137
* 开启 v2 版本弹窗
138138
*/

types/dialog/index.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ export interface DialogProps extends HTMLAttributesWeak, CommonProps {
152152
/**
153153
* 对话框的高度样式属性
154154
*/
155-
height?: string;
155+
height?: string | number;
156156
popupContainer?: string | HTMLElement | ((target: HTMLElement) => HTMLElement);
157157
/**
158158
* 开启 v2 版本弹窗

0 commit comments

Comments
 (0)