Skip to content

Commit

Permalink
fix(tooltips,Popover): tips组件把漏掉了边框 TencentBlueKing#1977
Browse files Browse the repository at this point in the history
  • Loading branch information
cjyscjys committed Aug 20, 2024
1 parent 81dd4e4 commit ef9067b
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 2 deletions.
18 changes: 17 additions & 1 deletion packages/popover/src/popover.less
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
}
}
Expand Down
37 changes: 36 additions & 1 deletion packages/styles/src/mixins/popper.less
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -35,6 +68,8 @@
&[data-show] {
display: block;
}


}

.@{bk-prefix}-popper[data-popper-placement^='top']>.@{bk-prefix}-popper-arrow {
Expand Down

0 comments on commit ef9067b

Please sign in to comment.