remove alert change

This commit is contained in:
zhujun24 2015-08-03 18:14:04 +08:00
parent f7c7bbe76f
commit cb96fc370d
5 changed files with 18 additions and 12 deletions

View File

@ -18,6 +18,8 @@ var openNotification = function() {
};
React.render(
<button className='ant-btn ant-btn-primary' onClick={openNotification}>基本</button>
, document.getElementById('components-notification-demo-basic'));
<div>
<button className='ant-btn ant-btn-primary' onClick={openNotification}>基本</button>
</div>,
document.getElementById('components-notification-demo-basic'));
````

View File

@ -11,18 +11,20 @@ var notification = require('antd/lib/notification');
var close = function() {
console.log("我被默认的关闭按钮关闭了!");
};
}
var openNotification = function() {
var args = {
message: "这是标题",
description: "这是提示框的文案这是提示框示框的文案这是提示是提示框的文案这是提示框的文案",
onClose: close
defaultClose: close
};
notification.open(args);
};
React.render(
<button className="ant-btn ant-btn-primary" onClick={openNotification}>关闭按钮触发回调函数</button>
, document.getElementById('components-notification-demo-onclose'));
<div>
<button className='ant-btn ant-btn-primary' onClick={openNotification}>关闭按钮触发回调函数</button>
</div>,
document.getElementById('components-notification-demo-onclose'));
````

View File

@ -19,7 +19,7 @@ var close = function() {
var onClose = function() {
// 默认按钮关闭时的业务处理
console.log("我被默认的关闭按钮关闭了!");
};
}
var btn = <button onClick={close} className="ant-btn ant-btn-primary ant-btn-sm">自定义关闭按钮并触发回调函数</button>;

View File

@ -21,11 +21,13 @@ var openNotification = function() {
description: "这是提示框的文案这是提示框示框的文案这是提示是提示框的文案这是提示框的文案",
btn: btn,
key: 'singleKey2'
};
};
notification.open(args);
};
React.render(
<button className="ant-btn ant-btn-primary" onClick={openNotification}>自定义关闭按钮</button>
, document.getElementById('components-notification-demo-with-btn'));
<div>
<button className="ant-btn ant-btn-primary" onClick={openNotification}>自定义关闭按钮</button>
</div>,
document.getElementById('components-notification-demo-with-btn'));
````

View File

@ -44,7 +44,7 @@ function notice(args) {
</div>,
duration: null,
closable: true,
onClose: args.onClose,
onClose: args.defaultClose,
style: {}
});
} else {
@ -57,7 +57,7 @@ function notice(args) {
</div>,
duration: null,
closable: true,
onClose: args.onClose,
onClose: args.defaultClose,
style: {}
});
} else {