From a0b271ba8ceecf705ab99802987c87c82d19ab06 Mon Sep 17 00:00:00 2001 From: guy Date: Thu, 20 Jan 2022 20:32:14 +0800 Subject: [PATCH] =?UTF-8?q?feature:=20=E6=B0=94=E6=B3=A1=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E5=93=81=E7=89=8C=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jsy.lessconfig.json | 2 +- src/base/layer/layer.popup.js | 4 ++-- src/case/combo/bubblecombo/combo.bubble.js | 17 ++++++++++------- src/less/base/combo/combo.bubble.less | 2 +- src/less/base/view/popupview.less | 13 ++++++++++++- src/less/core/utils/common.less | 2 +- src/less/lib/constant.less | 2 +- 7 files changed, 28 insertions(+), 14 deletions(-) diff --git a/jsy.lessconfig.json b/jsy.lessconfig.json index 2ac35b60a..9efbfa906 100644 --- a/jsy.lessconfig.json +++ b/jsy.lessconfig.json @@ -1,5 +1,5 @@ { - "@background-color-primary": "#003D4D", + "@background-color-card-primary": "#003D4D", "@color-primary": "#00acbe", "font-color-normal": "#0d1540", "font-color-light-gray": "#0d1540", diff --git a/src/base/layer/layer.popup.js b/src/base/layer/layer.popup.js index 53c8e17d1..8ed9e336e 100644 --- a/src/base/layer/layer.popup.js +++ b/src/base/layer/layer.popup.js @@ -4,9 +4,9 @@ * @extends BI.Widget */ BI.PopupView = BI.inherit(BI.Widget, { - _defaultConfig: function () { + _defaultConfig: function (props) { return BI.extend(BI.PopupView.superclass._defaultConfig.apply(this, arguments), { - _baseCls: "bi-popup-view", + _baseCls: "bi-popup-view" + (props.primary ? " bi-primary" : ""), // 品牌色 primary: false, maxWidth: "auto", diff --git a/src/case/combo/bubblecombo/combo.bubble.js b/src/case/combo/bubblecombo/combo.bubble.js index a6f20bbbd..997caff67 100644 --- a/src/case/combo/bubblecombo/combo.bubble.js +++ b/src/case/combo/bubblecombo/combo.bubble.js @@ -99,7 +99,7 @@ BI.BubbleCombo = BI.inherit(BI.Widget, { }, _createTriangle: function (direction) { - var o = this.options, pos = {}, op = {}; + var self = this, o = this.options, pos = {}, op = {}; var adjustLength = this.options.adjustLength; var offset = this.element.offset(); var left = offset.left, right = offset.left + this.element.outerWidth(); @@ -147,15 +147,18 @@ BI.BubbleCombo = BI.inherit(BI.Widget, { cls: "button-combo-triangle-wrapper", items: [{ type: "bi.layout", - cls: "bubble-combo-triangle-" + direction + (o.primary ? " bi-primary": "") + cls: "bubble-combo-triangle-" + direction + (o.primary ? " bi-primary" : "") }] }); pos.el = this.triangle; - BI.createWidget({ - type: "bi.absolute", - element: this, - items: [pos] - }); + // 动画结束后再画三角 + setTimeout(function () { + BI.createWidget({ + type: "bi.absolute", + element: self, + items: [pos] + }); + }, 200); }, _createLeftTriangle: function () { diff --git a/src/less/base/combo/combo.bubble.less b/src/less/base/combo/combo.bubble.less index 16f9f6e9f..e5a59b0cb 100644 --- a/src/less/base/combo/combo.bubble.less +++ b/src/less/base/combo/combo.bubble.less @@ -30,7 +30,7 @@ background-color: @color-bi-background-bubble-combo-triangle; } &.bi-primary:before { - background-color: @background-color-primary; + background-color: @background-color-card-primary; } } } diff --git a/src/less/base/view/popupview.less b/src/less/base/view/popupview.less index efa864778..dae81230c 100644 --- a/src/less/base/view/popupview.less +++ b/src/less/base/view/popupview.less @@ -85,6 +85,17 @@ } } +.bi-popup-view.bi-primary { + .bi-bubble-arrow { + .bubble-arrow { + &:before { + background-color: @background-color-card-primary; + color: @color-card-primary; + } + } + } +} + .bi-theme-dark { .bubble-arrow:before { background: @color-bi-background-default-theme-dark; @@ -102,4 +113,4 @@ & .list-view-shadow { .box-shadow(0 1px 5px 0, fade(@background-color-normal-theme-dark, 80)); } -} \ No newline at end of file +} diff --git a/src/less/core/utils/common.less b/src/less/core/utils/common.less index 0dfefd2af..5d9b11c3e 100644 --- a/src/less/core/utils/common.less +++ b/src/less/core/utils/common.less @@ -123,7 +123,7 @@ color: @color-bi-text-card; } &.bi-primary { - background-color: @background-color-primary; + background-color: @background-color-card-primary; color: @color-card-primary; } } diff --git a/src/less/lib/constant.less b/src/less/lib/constant.less index 6029c7ef9..5236ce2cb 100644 --- a/src/less/lib/constant.less +++ b/src/less/lib/constant.less @@ -24,7 +24,7 @@ // 品牌 @color-primary: #3685f2; @color-card-primary: @color-white; -@background-color-primary: #1e4092; +@background-color-card-primary: #1e4092; //green @color-green-100: #13cd66;