Browse Source

fix message

pull/106/head
yiminghe 9 years ago
committed by afc163
parent
commit
5aa19b5567
  1. 6
      components/message/index.jsx

6
components/message/index.jsx

@ -4,14 +4,17 @@ import Notification from 'rc-notification';
let defaultDuration = 1.5;
let top;
var messageInstance;
function getMessageInstance() {
return Notification.newInstance({
messageInstance = messageInstance || Notification.newInstance({
prefixCls: 'ant-message',
transitionName: 'move-up',
style: {
top: top
} //
});
return messageInstance;
}
function notice(content, duration = defaultDuration, type) {
@ -21,7 +24,6 @@ function notice(content, duration = defaultDuration, type) {
'error': 'anticon-exclamation-circle ant-message-error'
})[type];
getMessageInstance().notice({
key: 'simpleMessage',
duration: duration,
style: {},
content: <div className="ant-message-custom-content">

Loading…
Cancel
Save