mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-28 13:09:40 +08:00
remove alert change
This commit is contained in:
parent
f7c7bbe76f
commit
cb96fc370d
@ -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'));
|
||||
````
|
@ -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'));
|
||||
````
|
@ -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>;
|
||||
|
||||
|
@ -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'));
|
||||
````
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user