Browse Source

KERNEL-9882 toast样式相关

es6
windy 3 years ago
parent
commit
ccf4905b1c
  1. 13
      bi.lessconfig.json
  2. 6
      demo/js/base/tip/demo.toast.js
  3. 1
      src/base/single/tip/tip.toast.js
  4. 2
      src/less/base/single/tip/tip.toast.less
  5. 5
      src/less/lib/theme.less
  6. 9
      src/less/resource/font.less

13
bi.lessconfig.json

@ -16,5 +16,16 @@
"@color-bi-background-disabled-active-radio-content": "#D0D4DA",
"@color-bi-background-disabled-active-radio-content-theme-dark": "#606479",
"@color-bi-background-disabled-active-checkbox-content": "#D0D4DA",
"@color-bi-background-disabled-active-checkbox-content-theme-dark": "#606479"
"@color-bi-background-disabled-active-checkbox-content-theme-dark": "#606479",
"@color-bi-background-tooltip-success": "#2E3A4D",
"@color-bi-border-tooltip-success": "#2E3A4D",
"@color-bi-background-toast-success": "#FFFFFF",
"@color-bi-background-toast-warning": "#FFFFFF",
"@color-bi-background-toast-error": "#FFFFFF",
"@color-bi-background-toast-normal": "#FFFFFF",
"@color-bi-color-toast-success": "#3FC47B",
"@color-bi-color-toast-warning": "#FAAA39",
"@color-bi-color-toast-error": "#E65251",
"@color-bi-color-toast-normal": "#2C60DB",
"@color-bi-color-toast-text": "#000A19"
}

6
demo/js/base/tip/demo.toast.js

@ -10,7 +10,9 @@ Demo.Toast = BI.inherit(BI.Widget, {
text: "简单Toast测试(success)",
height: 30,
handler: function () {
BI.Msg.toast("这是一条简单的数据");
BI.Msg.toast("这是一条简单的数据", {
level: "success"
});
}
}
}, {
@ -20,7 +22,7 @@ Demo.Toast = BI.inherit(BI.Widget, {
height: 30,
handler: function () {
BI.Msg.toast("这是一条很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长很长的数据", {
level: "normal"
});
}
}

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

@ -93,6 +93,7 @@ BI.Toast = BI.inherit(BI.Tip, {
this.text = BI.createWidget({
type: "bi.horizontal",
horizontalAlign: BI.HorizontalAlign.Stretch,
verticalAlign: BI.VerticalAlign.Middle,
element: this,
items: items,
vgap: 7,

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

@ -1,7 +1,7 @@
@import "../../../index";
.bi-toast{
color: @color-bi-text;
color: @color-bi-color-toast-text;
max-width: 400px;
min-width: 150px;
line-height: @font-size-16;

5
src/less/lib/theme.less

@ -27,6 +27,11 @@
@color-bi-background-toast-warning: @color-bi-background-warning;
@color-bi-background-toast-error: @color-bi-background-failure;
@color-bi-background-toast-normal: @color-bi-background-highlight;
@color-bi-color-toast-success: @color-bi-text;
@color-bi-color-toast-warning: @color-bi-text;
@color-bi-color-toast-error: @color-bi-text;
@color-bi-color-toast-normal: @color-bi-text;
@color-bi-color-toast-text: @color-bi-text;
//bubble
@color-bi-background-bubble-success: @color-bi-background-light-success;

9
src/less/resource/font.less

@ -1,5 +1,6 @@
@import "../lib/font";
@import "../lib/colors";
@import "../lib/theme";
@import "../image";
.addFontRes();
@ -81,10 +82,10 @@
.font-hover-active(pull-down-ha-font, @font-down-triangle, @color-bi-text-light-gray);
//toast
.font(toast-error-font, @font-tip-error);
.font(toast-success-font, @font-tip-success);
.font(toast-warning-font, @font-tip-warning);
.font(toast-message-font, @font-tip-message);
.font(toast-error-font, @font-tip-error, @color-bi-color-toast-error);
.font(toast-success-font, @font-tip-success, @color-bi-color-toast-error);
.font(toast-warning-font, @font-tip-warning, @color-bi-color-toast-warning);
.font(toast-message-font, @font-tip-message, @color-bi-color-toast-normal);
//数值区间
.font(less-font, @font-less);

Loading…
Cancel
Save