From 35f184b6757b435960848227b5400b975c10ce2b Mon Sep 17 00:00:00 2001 From: zsmj1994 Date: Tue, 18 May 2021 11:10:43 +0800 Subject: [PATCH] =?UTF-8?q?DEC-18736=20fix:=20=E8=B6=85=E9=95=BFtoast?= =?UTF-8?q?=E5=9C=A8IE=E4=B8=8B=E6=98=BE=E7=A4=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/base/single/tip/tip.toast.js | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/base/single/tip/tip.toast.js b/src/base/single/tip/tip.toast.js index 0426f8d37..6de7b5f2c 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,