Browse Source

Pull request #2913: DESIGN-3918 feat: 将各产品线的toast间距行高统一,不提供可配.整理布局

Merge in VISUAL/fineui from ~DAILER/fineui:master to master

* commit '6b1b9962a9043dc0afc897bac947399b67a7533f':
  DESIGN-3918 feat: 将各产品线的toast间距统一,不在提供可配.整理布局
es6
Dailer 2 years ago
parent
commit
2905f48f62
  1. 30
      src/base/single/tip/tip.toast.js

30
src/base/single/tip/tip.toast.js

@ -11,7 +11,6 @@ BI.Toast = BI.inherit(BI.Tip, {
minWidth: 100,
closableMaxWidth: 410,
maxWidth: 400,
hgap: 8
},
_defaultConfig: function () {
@ -21,7 +20,10 @@ BI.Toast = BI.inherit(BI.Tip, {
level: "success", // success或warning
autoClose: true,
closable: null,
vgap: 7,
textHeight: 20,
vgap: 10,
innerHgap: 4,
hgap: 8,
});
},
@ -46,7 +48,7 @@ BI.Toast = BI.inherit(BI.Tip, {
mouseleave: fn,
mousemove: fn
});
var cls = "close-font";
var cls;
switch (o.level) {
case "success":
cls = "toast-success-font";
@ -72,19 +74,18 @@ BI.Toast = BI.inherit(BI.Tip, {
var items = [{
type: "bi.icon_label",
cls: cls + " toast-icon",
width: 36
height: o.textHeight,
}, {
el: BI.isPlainObject(o.text) ? o.text : {
type: "bi.label",
whiteSpace: "normal",
text: o.text,
textHeight: 16,
textHeight: o.textHeight,
textAlign: "left"
},
rgap: hasCloseIcon() ? 0 : this._const.hgap
}];
var columnSize = [36, "fill"];
var columnSize = ["", "fill"];
if (hasCloseIcon()) {
items.push({
@ -93,23 +94,20 @@ BI.Toast = BI.inherit(BI.Tip, {
handler: function () {
self.destroy();
},
width: 36
height: o.textHeight,
});
columnSize.push(36);
columnSize.push("");
}
this.text = BI.createWidget({
return {
type: "bi.horizontal",
horizontalAlign: BI.HorizontalAlign.Stretch,
element: this,
items: items,
hgap: o.hgap,
vgap: o.vgap,
innerHgap: o.innerHgap,
columnSize: columnSize
});
},
setText: function (text) {
this.text.setText(text);
};
},
beforeDestroy: function () {

Loading…
Cancel
Save