Browse Source

DESIGN-3918 feat: toast新增loading效果

es6
zsmj 3 years ago
parent
commit
a9f41e3a17
  1. 3
      src/base/single/tip/tip.toast.js
  2. 17
      src/less/base/single/tip/tip.toast.less
  3. 1
      src/less/lib/font.less
  4. 1
      src/less/resource/font.less

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

@ -56,6 +56,9 @@ BI.Toast = BI.inherit(BI.Tip, {
case "warning": case "warning":
cls = "toast-warning-font"; cls = "toast-warning-font";
break; break;
case "loading":
cls = "toast-loading-font anim-rotate";
break;
case "normal": case "normal":
default: default:
cls = "toast-message-font"; cls = "toast-message-font";

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

@ -1,22 +1,27 @@
@import "../../../index.less"; @import "../../../index.less";
.bi-toast{ .bi-toast {
color: @color-bi-color-toast-text; color: @color-bi-color-toast-text;
line-height: @font-size-16; 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;
} }
&.toast-warning{
&.toast-warning {
background: @color-bi-background-toast-warning; background: @color-bi-background-toast-warning;
} }
&.toast-error{
&.toast-error {
background: @color-bi-background-toast-error; background: @color-bi-background-toast-error;
} }
&.toast-normal, &.toast-common{
&.toast-normal, &.toast-common, &.toast-loading {
background: @color-bi-background-toast-normal; background: @color-bi-background-toast-normal;
} }
& .toast-icon{
& .toast-icon {
font-size: @font-size-16; font-size: @font-size-16;
} }
} }

1
src/less/lib/font.less

@ -51,6 +51,7 @@
@font-tip-success: "e1db"; @font-tip-success: "e1db";
@font-tip-warning: "e1d7"; @font-tip-warning: "e1d7";
@font-tip-message: "e1d9"; @font-tip-message: "e1d9";
@font-tip-loading: "e7cd";
@font-key: "e1d0"; @font-key: "e1d0";

1
src/less/resource/font.less

@ -86,6 +86,7 @@
.font(toast-success-font, @font-tip-success, @color-bi-color-toast-success); .font(toast-success-font, @font-tip-success, @color-bi-color-toast-success);
.font(toast-warning-font, @font-tip-warning, @color-bi-color-toast-warning); .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(toast-message-font, @font-tip-message, @color-bi-color-toast-normal);
.font(toast-loading-font, @font-tip-loading, @color-bi-color-toast-normal);
//数值区间 //数值区间
.font(less-font, @font-less); .font(less-font, @font-less);

Loading…
Cancel
Save