Browse Source

无JIRA toast容错

es6
zsmj 2 years ago
parent
commit
4360c7dba9
  1. 6
      src/base/foundation/message.js

6
src/base/foundation/message.js

@ -22,7 +22,7 @@ BI.Msg = function () {
// BI.Msg.prompt(title, message, value, callback, min_width);
},
toast: function (message, options, context) {
BI.isString(options) && (options = { level: options })
BI.isString(options) && (options = { level: options });
options = options || {};
context = context || BI.Widget._renderEngine.createElement("body");
var level = options.level || "common";
@ -67,11 +67,11 @@ BI.Msg = function () {
autoClose && BI.delay(function () {
toast.element.removeClass("bi-message-enter").addClass("bi-message-leave");
toast.destroy();
toast.destroy?.();
}, 5000);
return function () {
toast.element.removeClass("bi-message-enter").addClass("bi-message-leave");
toast.destroy();
toast.destroy?.();
};
},
_show: function (hasCancel, title, message, callback) {

Loading…
Cancel
Save