提交 38235884 编写于 作者: C Catouse

* messager support hide all instances by global method.

上级 1dddf835
...@@ -135,6 +135,15 @@ ...@@ -135,6 +135,15 @@
return msg; return msg;
}; };
var hideMessage = function()
{
$('.messager').each(function()
{
var msg = $(this).data('zui.messager');
if(msg && msg.hide) msg.hide();
});
};
var getOptions = function(options) var getOptions = function(options)
{ {
return (typeof options === 'string') ? return (typeof options === 'string') ?
...@@ -149,6 +158,7 @@ ...@@ -149,6 +158,7 @@
messager: messager:
{ {
show: showMessage, show: showMessage,
hide: hideMessage,
primary: function(message, options) primary: function(message, options)
{ {
return showMessage(message, $.extend( return showMessage(message, $.extend(
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册