Browse Source

BI-96759 支持自定义text

es6
guy 3 years ago
parent
commit
33aa69fcbc
  1. 4
      src/base/single/tip/tip.toast.js
  2. 1
      src/less/base/single/tip/tip.toast.less

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

@ -61,13 +61,13 @@ BI.Toast = BI.inherit(BI.Tip, {
cls: cls + " toast-icon", cls: cls + " toast-icon",
width: 36 width: 36
}, { }, {
el: { el: BI.isString(o.text) ? {
type: "bi.label", type: "bi.label",
whiteSpace: "normal", whiteSpace: "normal",
text: o.text, text: o.text,
textHeight: 16, textHeight: 16,
textAlign: "left" textAlign: "left"
}, } : o.text,
rgap: o.autoClose ? this._const.hgap : 0 rgap: o.autoClose ? this._const.hgap : 0
}]; }];

1
src/less/base/single/tip/tip.toast.less

@ -4,6 +4,7 @@
color: @color-bi-text; color: @color-bi-text;
max-width: 400px; max-width: 400px;
min-width: 150px; min-width: 150px;
line-height: @font-size-16;
.border-radius(2px); .border-radius(2px);
&.toast-success{ &.toast-success{
background: @color-bi-background-toast-success; background: @color-bi-background-toast-success;

Loading…
Cancel
Save