Browse Source

feature: 小三角

es6
guy 3 years ago
parent
commit
d9369897a3
  1. 2
      src/base/combination/bubble.js
  2. 2
      src/base/combination/combo.js
  3. 2
      src/base/layer/layer.popup.js
  4. 38
      src/less/base/view/popupview.less

2
src/base/combination/bubble.js

@ -332,7 +332,7 @@
name: "offset", name: "offset",
options: { options: {
offset: function () { offset: function () {
return [o.adjustXOffset, (o.showArrow ? 9 : 0) + (o.adjustYOffset + o.adjustLength)]; return [o.adjustXOffset, (o.showArrow ? 14 : 0) + (o.adjustYOffset + o.adjustLength)];
} }
} }
}]; }];

2
src/base/combination/combo.js

@ -7,7 +7,7 @@
*/ */
BI.Combo = BI.inherit(BI.Bubble, { BI.Combo = BI.inherit(BI.Bubble, {
_const: { _const: {
TRIANGLE_LENGTH: 9 TRIANGLE_LENGTH: 14
}, },
_defaultConfig: function () { _defaultConfig: function () {
var conf = BI.Combo.superclass._defaultConfig.apply(this, arguments); var conf = BI.Combo.superclass._defaultConfig.apply(this, arguments);

2
src/base/layer/layer.popup.js

@ -5,7 +5,7 @@
*/ */
BI.PopupView = BI.inherit(BI.Widget, { BI.PopupView = BI.inherit(BI.Widget, {
_const: { _const: {
TRIANGLE_LENGTH: 9 TRIANGLE_LENGTH: 14
}, },
_defaultConfig: function (props) { _defaultConfig: function (props) {
return BI.extend(BI.PopupView.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.PopupView.superclass._defaultConfig.apply(this, arguments), {

38
src/less/base/view/popupview.less

@ -32,11 +32,11 @@
bottom: 0; bottom: 0;
left: 0; left: 0;
> .bi-bubble-arrow { > .bi-bubble-arrow {
bottom: -12px; bottom: -14px;
width: 14px; width: 18px;
> .bubble-arrow { > .bubble-arrow {
bottom: 8px; bottom: 8px;
left: 1px; left: 2px;
} }
} }
} }
@ -46,11 +46,11 @@
top: 0; top: 0;
left: 0; left: 0;
> .bi-bubble-arrow { > .bi-bubble-arrow {
top: -12px; top: -14px;
width: 14px; width: 18px;
> .bubble-arrow { > .bubble-arrow {
top: 8px; top: 8px;
left: 1px; left: 2px;
} }
} }
} }
@ -60,11 +60,11 @@
right: 0; right: 0;
top: 0; top: 0;
> .bi-bubble-arrow { > .bi-bubble-arrow {
right: -12px; right: -14px;
height: 14px; height: 18px;
> .bubble-arrow { > .bubble-arrow {
right: 8px; right: 8px;
top: 1px; top: 2px;
} }
} }
} }
@ -74,29 +74,29 @@
left: 0; left: 0;
top: 0; top: 0;
> .bi-bubble-arrow { > .bi-bubble-arrow {
left: -12px; left: -14px;
height: 14px; height: 18px;
> .bubble-arrow { > .bubble-arrow {
left: 8px; left: 8px;
top: 1px; top: 2px;
} }
} }
} }
} }
.bi-bubble-arrow { .bi-bubble-arrow {
width: 12px; width: 14px;
height: 12px; height: 14px;
// 消除祖先节点设置的line-height:normal对空白节点的行高影响 // 消除祖先节点设置的line-height:normal对空白节点的行高影响
line-height: 0; line-height: 0;
overflow: hidden; overflow: hidden;
.bubble-arrow { .bubble-arrow {
width: 12px; width: 14px;
height: 12px; height: 14px;
position: absolute; position: absolute;
&:before { &:before {
width: 12px; width: 14px;
height: 12px; height: 14px;
position: absolute; position: absolute;
content: ""; content: "";
background: @color-bi-background-default; background: @color-bi-background-default;
@ -106,7 +106,7 @@
visibility: visible; visibility: visible;
transform: translateX(0px) rotate(-135deg); transform: translateX(0px) rotate(-135deg);
transform-origin: center center; transform-origin: center center;
.box-shadow(3px 3px 10px 0,rgba(0,0,0,6%)); .box-shadow(3px 3px 10px 0,rgba(0, 0, 0, 6%));
} }
} }
} }

Loading…
Cancel
Save