From ef9067b1f78748d01547b5e67522cd57af8f4fe8 Mon Sep 17 00:00:00 2001 From: ccjechen <1906342663@qq.com> Date: Tue, 20 Aug 2024 15:48:36 +0800 Subject: [PATCH] =?UTF-8?q?fix(tooltips,Popover):=20tips=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E6=8A=8A=E6=BC=8F=E6=8E=89=E4=BA=86=E8=BE=B9=E6=A1=86=20#1977?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/popover/src/popover.less | 18 ++++++++++++- packages/styles/src/mixins/popper.less | 37 +++++++++++++++++++++++++- 2 files changed, 53 insertions(+), 2 deletions(-) diff --git a/packages/popover/src/popover.less b/packages/popover/src/popover.less index ece14d50f..921b5c915 100644 --- a/packages/popover/src/popover.less +++ b/packages/popover/src/popover.less @@ -30,9 +30,25 @@ color: #26323d; background-color: #fff; box-shadow: 0 0 6px 0 #dcdee5; - + border: 1px solid #dcdee5; .@{bk-prefix}-pop2-arrow { background-color: #fff; + &[data-arrow='top']{ + border-right: 1px solid #dcdee5; + border-bottom: 1px solid #dcdee5; + } + &[data-arrow='right']{ + border-left: 1px solid #dcdee5; + border-bottom: 1px solid #dcdee5; + } + &[data-arrow='left']{ + border-right: 1px solid #dcdee5; + border-top: 1px solid #dcdee5; + } + &[data-arrow='bottom']{ + border-left: 1px solid #dcdee5; + border-top: 1px solid #dcdee5; + } } } } diff --git a/packages/styles/src/mixins/popper.less b/packages/styles/src/mixins/popper.less index 3cdb2ab7e..6ad788c7f 100644 --- a/packages/styles/src/mixins/popper.less +++ b/packages/styles/src/mixins/popper.less @@ -7,13 +7,46 @@ color: #fff; background: #333; border-radius: 4px; - + border: 1px solid #dcdee5; &.light { color: #63656e; background: #fff; box-shadow: rgb(220, 222, 229) 0 0 6px 0; + &[data-popper-placement^='top'] { + .@{bk-prefix}-popper-arrow{ + &::before{ + border-right: 1px solid #dcdee5; + border-bottom: 1px solid #dcdee5; + } + } + } + &[data-popper-placement^='right'] { + .@{bk-prefix}-popper-arrow{ + &::before{ + border-left: 1px solid #dcdee5; + border-bottom: 1px solid #dcdee5; + } + } + } + &[data-popper-placement^='left'] { + .@{bk-prefix}-popper-arrow{ + &::before{ + border-right: 1px solid #dcdee5; + border-top: 1px solid #dcdee5; + } + } + } + &[data-popper-placement^='bottom'] { + .@{bk-prefix}-popper-arrow{ + &::before{ + border-left: 1px solid #dcdee5; + border-top: 1px solid #dcdee5; + } + } + } } + .@{bk-prefix}-popper-arrow, .@{bk-prefix}-popper-arrow::before { position: absolute; @@ -35,6 +68,8 @@ &[data-show] { display: block; } + + } .@{bk-prefix}-popper[data-popper-placement^='top']>.@{bk-prefix}-popper-arrow {