diff --git a/src/base/single/tip/tip.toast.js b/src/base/single/tip/tip.toast.js index 0426f8d373..6de7b5f2c4 100644 --- a/src/base/single/tip/tip.toast.js +++ b/src/base/single/tip/tip.toast.js @@ -30,9 +30,17 @@ BI.Toast = BI.inherit(BI.Tip, { e.stopEvent(); return false; }; - this.element.bind({click: fn, mousedown: fn, mouseup: fn, mouseover: fn, mouseenter: fn, mouseleave: fn, mousemove: fn}); + this.element.bind({ + click: fn, + mousedown: fn, + mouseup: fn, + mouseover: fn, + mouseenter: fn, + mouseleave: fn, + mousemove: fn + }); var cls = "close-font"; - switch(o.level) { + switch (o.level) { case "success": cls = "toast-success-font"; break; @@ -65,7 +73,7 @@ BI.Toast = BI.inherit(BI.Tip, { var columnSize = [36, ""]; - if(o.autoClose === false) { + if (o.autoClose === false) { items.push({ type: "bi.icon_button", cls: "close-font toast-icon", @@ -78,7 +86,8 @@ BI.Toast = BI.inherit(BI.Tip, { } this.text = BI.createWidget({ - type: "bi.horizontal_adapt", + type: "bi.horizontal", + horizontalAlign: BI.HorizontalAlign.Stretch, element: this, items: items, vgap: 7,