Browse Source

Pull request #2438: feature: 气泡支持品牌色

Merge in VISUAL/fineui from ~GUY/fineui:master to master

* commit 'a0b271ba8ceecf705ab99802987c87c82d19ab06':
  feature: 气泡支持品牌色
es6
guy 3 years ago
parent
commit
1366314057
  1. 2
      jsy.lessconfig.json
  2. 4
      src/base/layer/layer.popup.js
  3. 9
      src/case/combo/bubblecombo/combo.bubble.js
  4. 2
      src/less/base/combo/combo.bubble.less
  5. 11
      src/less/base/view/popupview.less
  6. 2
      src/less/core/utils/common.less
  7. 2
      src/less/lib/constant.less

2
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",

4
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",

9
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;
// 动画结束后再画三角
setTimeout(function () {
BI.createWidget({
type: "bi.absolute",
element: this,
element: self,
items: [pos]
});
}, 200);
},
_createLeftTriangle: function () {

2
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;
}
}
}

11
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;

2
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;
}
}

2
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;

Loading…
Cancel
Save