From e66b8aa2d9d959a7c0ade5cd113f3c75501d6ec4 Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Fri, 23 Feb 2018 17:00:40 +0800 Subject: [PATCH] =?UTF-8?q?toast=E5=8E=BB=E5=8A=A8=E7=94=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dist/base.js | 12 +++++------- src/base/foundation/message.js | 12 +++++------- 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/dist/base.js b/dist/base.js index e11ba393e..8498bf5ce 100644 --- a/dist/base.js +++ b/dist/base.js @@ -14782,13 +14782,11 @@ $.extend(BI, { }] }); toast.element.css({"margin-left": -1 * toast.element.outerWidth() / 2}); - toast.element.slideDown(500, function () { - autoClose && BI.delay(function () { - toast.element.slideUp(500, function () { - toast.destroy(); - }); - }, 5000); - }); + toast.element.show(); + autoClose && BI.delay(function () { + toast.element.hide(); + toast.destroy(); + }, 5000); }, _show: function (hasCancel, title, message, callback) { $mask = $("
").css({ diff --git a/src/base/foundation/message.js b/src/base/foundation/message.js index 1aba868fb..95172132e 100644 --- a/src/base/foundation/message.js +++ b/src/base/foundation/message.js @@ -39,13 +39,11 @@ $.extend(BI, { }] }); toast.element.css({"margin-left": -1 * toast.element.outerWidth() / 2}); - toast.element.slideDown(500, function () { - autoClose && BI.delay(function () { - toast.element.slideUp(500, function () { - toast.destroy(); - }); - }, 5000); - }); + toast.element.show(); + autoClose && BI.delay(function () { + toast.element.hide(); + toast.destroy(); + }, 5000); }, _show: function (hasCancel, title, message, callback) { $mask = $("
").css({