Browse Source

chore: 优化一下

es6
guy 3 years ago
parent
commit
4353603602
  1. 3
      src/base/layer/layer.popup.js
  2. 24
      src/less/base/view/popupview.less

3
src/base/layer/layer.popup.js

@ -106,10 +106,11 @@ BI.PopupView = BI.inherit(BI.Widget, {
}); });
this.arrowWrapper = BI.createWidget({ this.arrowWrapper = BI.createWidget({
type: "bi.absolute", type: "bi.absolute",
cls: "bi-bubble-arrow-wrapper",
items: [{ items: [{
el: this.arrow, el: this.arrow,
}] }]
}) });
// 因为三角符号的原因位置变大了,需要占位 // 因为三角符号的原因位置变大了,需要占位
this.placeholder = BI.createWidget({ this.placeholder = BI.createWidget({
type: "bi.layout" type: "bi.layout"

24
src/less/base/view/popupview.less

@ -28,7 +28,10 @@
} }
.bi-popup-view[data-popper-placement^='top'], .bi-popup-view.top { .bi-popup-view[data-popper-placement^='top'], .bi-popup-view.top {
> div > .bi-bubble-arrow { > .bi-bubble-arrow-wrapper {
bottom: 0;
left: 0;
> .bi-bubble-arrow {
bottom: -12px; bottom: -12px;
width: 14px; width: 14px;
> .bubble-arrow { > .bubble-arrow {
@ -37,8 +40,12 @@
} }
} }
} }
}
.bi-popup-view[data-popper-placement^='bottom'], .bi-popup-view.bottom { .bi-popup-view[data-popper-placement^='bottom'], .bi-popup-view.bottom {
> div > .bi-bubble-arrow { > .bi-bubble-arrow-wrapper {
top: 0;
left: 0;
> .bi-bubble-arrow {
top: -12px; top: -12px;
width: 14px; width: 14px;
> .bubble-arrow { > .bubble-arrow {
@ -47,8 +54,12 @@
} }
} }
} }
}
.bi-popup-view[data-popper-placement^='left'], .bi-popup-view.left { .bi-popup-view[data-popper-placement^='left'], .bi-popup-view.left {
> div > .bi-bubble-arrow { > .bi-bubble-arrow-wrapper {
right: 0;
top: 0;
> .bi-bubble-arrow {
right: -12px; right: -12px;
height: 14px; height: 14px;
> .bubble-arrow { > .bubble-arrow {
@ -57,8 +68,12 @@
} }
} }
} }
}
.bi-popup-view[data-popper-placement^='right'], .bi-popup-view.right { .bi-popup-view[data-popper-placement^='right'], .bi-popup-view.right {
> div > .bi-bubble-arrow { > .bi-bubble-arrow-wrapper {
left: 0;
top: 0;
> .bi-bubble-arrow {
left: -12px; left: -12px;
height: 14px; height: 14px;
> .bubble-arrow { > .bubble-arrow {
@ -67,6 +82,7 @@
} }
} }
} }
}
.bi-bubble-arrow { .bi-bubble-arrow {
width: 12px; width: 12px;

Loading…
Cancel
Save