|
|
@ -19,50 +19,59 @@ var getMessageInstance = function(){
|
|
|
|
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
module.exports = {
|
|
|
|
|
|
|
|
|
|
|
|
info: function(m) {
|
|
|
|
info: function(m, t) {
|
|
|
|
if (!message) {
|
|
|
|
if (!message) {
|
|
|
|
message = getMessageInstance();
|
|
|
|
message = getMessageInstance();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
t = t || 2.5;
|
|
|
|
message.notice({
|
|
|
|
message.notice({
|
|
|
|
key: 'simpleMessage',
|
|
|
|
key: 'simpleMessage',
|
|
|
|
duration: 2.5,
|
|
|
|
duration: t,
|
|
|
|
style: {
|
|
|
|
style: {
|
|
|
|
left: '50%'
|
|
|
|
left: '50%'
|
|
|
|
},
|
|
|
|
},
|
|
|
|
content: <div className='ant-message-custom-content'><i className='anticon anticon-info-circle ant-message-info'></i><span>{m}</span></div>
|
|
|
|
content: <div className='ant-message-custom-content'>
|
|
|
|
|
|
|
|
<i className='anticon anticon-info-circle ant-message-info'></i>
|
|
|
|
|
|
|
|
<span>{m}</span>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
success: function(m) {
|
|
|
|
success: function(m, t) {
|
|
|
|
|
|
|
|
|
|
|
|
if (!message) {
|
|
|
|
if (!message) {
|
|
|
|
message = getMessageInstance();
|
|
|
|
message = getMessageInstance();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
t = t || 2.5;
|
|
|
|
message.notice({
|
|
|
|
message.notice({
|
|
|
|
key: 'simpleMessage1',
|
|
|
|
key: 'simpleMessage1',
|
|
|
|
transitionName: 'move-up',
|
|
|
|
transitionName: 'move-up',
|
|
|
|
duration: 2.5,
|
|
|
|
duration: t,
|
|
|
|
style: {
|
|
|
|
style: {
|
|
|
|
left: '50%'
|
|
|
|
left: '50%'
|
|
|
|
},
|
|
|
|
},
|
|
|
|
content: <div className='ant-message-custom-content'><i className='anticon anticon-check-circle ant-message-success'></i><span>{m}</span></div>
|
|
|
|
content: <div className='ant-message-custom-content'>
|
|
|
|
|
|
|
|
<i className='anticon anticon-check-circle ant-message-success'></i>
|
|
|
|
|
|
|
|
<span>{m}</span>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
error: function(m) {
|
|
|
|
error: function(m, t) {
|
|
|
|
|
|
|
|
|
|
|
|
if (!message) {
|
|
|
|
if (!message) {
|
|
|
|
message = getMessageInstance();
|
|
|
|
message = getMessageInstance();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
t = t || 2.5;
|
|
|
|
message.notice({
|
|
|
|
message.notice({
|
|
|
|
key: 'simpleMessage2',
|
|
|
|
key: 'simpleMessage2',
|
|
|
|
transitionName: 'move-up',
|
|
|
|
transitionName: 'move-up',
|
|
|
|
duration: 2.5,
|
|
|
|
duration: t,
|
|
|
|
style: {
|
|
|
|
style: {
|
|
|
|
left: '50%'
|
|
|
|
left: '50%'
|
|
|
|
},
|
|
|
|
},
|
|
|
|
content: <div className='ant-message-custom-content'><i className='anticon anticon-exclamation-circle ant-message-error'></i><span>{m}</span></div>
|
|
|
|
content: <div className='ant-message-custom-content'>
|
|
|
|
|
|
|
|
<i className='anticon anticon-exclamation-circle ant-message-error'></i>
|
|
|
|
|
|
|
|
<span>{m}</span>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|