From 4353603602162839b0a867b3385284a850f8f161 Mon Sep 17 00:00:00 2001 From: guy Date: Thu, 24 Feb 2022 17:19:05 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E4=BC=98=E5=8C=96=E4=B8=80=E4=B8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/base/layer/layer.popup.js | 3 +- src/less/base/view/popupview.less | 64 +++++++++++++++++++------------ 2 files changed, 42 insertions(+), 25 deletions(-) diff --git a/src/base/layer/layer.popup.js b/src/base/layer/layer.popup.js index 549558d67..680d79594 100644 --- a/src/base/layer/layer.popup.js +++ b/src/base/layer/layer.popup.js @@ -106,10 +106,11 @@ BI.PopupView = BI.inherit(BI.Widget, { }); this.arrowWrapper = BI.createWidget({ type: "bi.absolute", + cls: "bi-bubble-arrow-wrapper", items: [{ el: this.arrow, }] - }) + }); // 因为三角符号的原因位置变大了,需要占位 this.placeholder = BI.createWidget({ type: "bi.layout" diff --git a/src/less/base/view/popupview.less b/src/less/base/view/popupview.less index b14bb4e35..318518b57 100644 --- a/src/less/base/view/popupview.less +++ b/src/less/base/view/popupview.less @@ -28,42 +28,58 @@ } .bi-popup-view[data-popper-placement^='top'], .bi-popup-view.top { - > div > .bi-bubble-arrow { - bottom: -12px; - width: 14px; - > .bubble-arrow { - bottom: 8px; - left: 1px; + > .bi-bubble-arrow-wrapper { + bottom: 0; + left: 0; + > .bi-bubble-arrow { + bottom: -12px; + width: 14px; + > .bubble-arrow { + bottom: 8px; + left: 1px; + } } } } .bi-popup-view[data-popper-placement^='bottom'], .bi-popup-view.bottom { - > div > .bi-bubble-arrow { - top: -12px; - width: 14px; - > .bubble-arrow { - top: 8px; - left: 1px; + > .bi-bubble-arrow-wrapper { + top: 0; + left: 0; + > .bi-bubble-arrow { + top: -12px; + width: 14px; + > .bubble-arrow { + top: 8px; + left: 1px; + } } } } .bi-popup-view[data-popper-placement^='left'], .bi-popup-view.left { - > div > .bi-bubble-arrow { - right: -12px; - height: 14px; - > .bubble-arrow { - right: 8px; - top: 1px; + > .bi-bubble-arrow-wrapper { + right: 0; + top: 0; + > .bi-bubble-arrow { + right: -12px; + height: 14px; + > .bubble-arrow { + right: 8px; + top: 1px; + } } } } .bi-popup-view[data-popper-placement^='right'], .bi-popup-view.right { - > div > .bi-bubble-arrow { - left: -12px; - height: 14px; - > .bubble-arrow { - left: 8px; - top: 1px; + > .bi-bubble-arrow-wrapper { + left: 0; + top: 0; + > .bi-bubble-arrow { + left: -12px; + height: 14px; + > .bubble-arrow { + left: 8px; + top: 1px; + } } } }