Browse Source

chore: 优化一下

es6
guy 3 years ago
parent
commit
4353603602
  1. 3
      src/base/layer/layer.popup.js
  2. 64
      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"

64
src/less/base/view/popupview.less

@ -28,42 +28,58 @@
} }
.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: -12px; bottom: 0;
width: 14px; left: 0;
> .bubble-arrow { > .bi-bubble-arrow {
bottom: 8px; bottom: -12px;
left: 1px; width: 14px;
> .bubble-arrow {
bottom: 8px;
left: 1px;
}
} }
} }
} }
.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: -12px; top: 0;
width: 14px; left: 0;
> .bubble-arrow { > .bi-bubble-arrow {
top: 8px; top: -12px;
left: 1px; width: 14px;
> .bubble-arrow {
top: 8px;
left: 1px;
}
} }
} }
} }
.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: -12px; right: 0;
height: 14px; top: 0;
> .bubble-arrow { > .bi-bubble-arrow {
right: 8px; right: -12px;
top: 1px; height: 14px;
> .bubble-arrow {
right: 8px;
top: 1px;
}
} }
} }
} }
.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: -12px; left: 0;
height: 14px; top: 0;
> .bubble-arrow { > .bi-bubble-arrow {
left: 8px; left: -12px;
top: 1px; height: 14px;
> .bubble-arrow {
left: 8px;
top: 1px;
}
} }
} }
} }

Loading…
Cancel
Save