diff --git a/bi.lessconfig.json b/bi.lessconfig.json index 975ecf6b6..ecd7c55cb 100644 --- a/bi.lessconfig.json +++ b/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" } diff --git a/demo/js/base/tip/demo.toast.js b/demo/js/base/tip/demo.toast.js index 9d0352a6f..fcb845964 100644 --- a/demo/js/base/tip/demo.toast.js +++ b/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" + }); } } diff --git a/src/base/single/tip/tip.toast.js b/src/base/single/tip/tip.toast.js index f853d8659..cf2a61476 100644 --- a/src/base/single/tip/tip.toast.js +++ b/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, diff --git a/src/less/base/single/tip/tip.toast.less b/src/less/base/single/tip/tip.toast.less index 6ac76d4a6..7f7838f29 100644 --- a/src/less/base/single/tip/tip.toast.less +++ b/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; diff --git a/src/less/lib/theme.less b/src/less/lib/theme.less index 9575a2ae1..d83ef3789 100644 --- a/src/less/lib/theme.less +++ b/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; diff --git a/src/less/resource/font.less b/src/less/resource/font.less index d1a6b6354..6c7b3994d 100644 --- a/src/less/resource/font.less +++ b/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);