File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -35,6 +35,8 @@ class ModalDemo extends React.Component {
3535 title: ' 基本确认对话框' ,
3636 body: ' 杭州数云信息技术有限公司是国内领先的全域消费者增长方案提供商' ,
3737 cancelBtnOpts: { type: ' secondary' },
38+ // hasFooter: false,
39+ // className: "test",
3840 onOk : () => {
3941 this .handleOk ();
4042 },
Original file line number Diff line number Diff line change @@ -68,6 +68,8 @@ Modal.warning(config)
6868| cancelText | 取消按钮自定义文本 | string | ` 取消 ` |
6969| onOk | 确定按钮回调函数,仅` Modal.confirm() ` 函数支持 | function | ` -- ` |
7070| onClose | 取消按钮回调函数 | function | ` -- ` |
71+ | className | 设置弹出框样式名称 | string | - |
72+ | hasFooter | 是否显示底部区域 | boolean | ` true ` |
7173
7274` Modal.confirm() ` 函数的` onOk ` 回调函数支持返回` false ` 阻止关闭弹框,或者返回一个` promise ` 延迟关闭,具体使用见示例:确认对话框 Demo
7375
Original file line number Diff line number Diff line change @@ -24,6 +24,8 @@ class Prompt extends React.Component {
2424 cancelText : '取消' ,
2525 onOk : noop ,
2626 onCancel : noop ,
27+ hasFooter : true ,
28+ className : '' ,
2729 } ;
2830
2931 static propTypes = {
@@ -37,6 +39,8 @@ class Prompt extends React.Component {
3739 okText : PropTypes . string ,
3840 cancelText : PropTypes . string ,
3941 onCancel : PropTypes . func ,
42+ hasFooter : PropTypes . bool ,
43+ className : PropTypes . string ,
4044 } ;
4145
4246 constructor ( props ) {
@@ -181,6 +185,8 @@ class Prompt extends React.Component {
181185 bodyStyle = { promptBodyStyle }
182186 modalStyle = { promptStyle }
183187 showConfirmLoading = { this . state . showConfirmLoading }
188+ hasFooter = { this . props . hasFooter }
189+ className = { this . props . className }
184190 >
185191 < div >
186192 < header className = "info-area" >
@@ -232,6 +238,8 @@ function prompt({
232238 okBtnOpts,
233239 cancelBtnOpts,
234240 title,
241+ hasFooter,
242+ className,
235243} ) {
236244 // 创建一个关联id
237245 const rootDocument = getRootWindow ( ) . document ;
@@ -251,6 +259,8 @@ function prompt({
251259 style = { style }
252260 iconStyle = { iconStyle }
253261 isShowIcon = { isShowIcon }
262+ hasFooter = { hasFooter }
263+ className = { className }
254264 okText = { okText }
255265 cancelText = { cancelText }
256266 okBtnOpts = { okBtnOpts }
You can’t perform that action at this time.
0 commit comments