提交 5aa19b55 编写于 作者: Y yiminghe 提交者: afc163

fix message

上级 e00a562c
......@@ -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">
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册