mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-03 04:30:06 +08:00
Allow multiple confirm dialogs popup
This commit is contained in:
parent
388bf241c5
commit
d6a4094bc4
@ -1,8 +1,10 @@
|
||||
import React from 'react';
|
||||
import Dialog from './index';
|
||||
let div;
|
||||
|
||||
export default function (props) {
|
||||
let div = document.createElement('div');
|
||||
document.body.appendChild(div);
|
||||
|
||||
let d;
|
||||
props = props || {};
|
||||
props.iconClassName = props.iconClassName || 'anticon-question-circle';
|
||||
@ -17,6 +19,7 @@ export default function (props) {
|
||||
d.setState({
|
||||
visible: false
|
||||
});
|
||||
React.unmountComponentAtNode(div);
|
||||
}
|
||||
|
||||
function onCancel() {
|
||||
@ -80,11 +83,6 @@ export default function (props) {
|
||||
</div>;
|
||||
}
|
||||
|
||||
if (!div) {
|
||||
div = document.createElement('div');
|
||||
document.body.appendChild(div);
|
||||
}
|
||||
|
||||
React.render(<Dialog
|
||||
prefixCls="ant-modal"
|
||||
className="ant-confirm"
|
||||
|
@ -15,6 +15,11 @@ function info() {
|
||||
content: '一些附加信息一些附加信息一些附加信息',
|
||||
onOk: function() {}
|
||||
});
|
||||
Modal.info({
|
||||
title: '这是一条通知信息',
|
||||
content: '一些附加信息一些附加信息一些附加信息',
|
||||
onOk: function() {}
|
||||
});
|
||||
}
|
||||
|
||||
function success() {
|
||||
|
Loading…
Reference in New Issue
Block a user