Skip to content

Commit

Permalink
fix(badge): 圆角方形样式 (#1617)
Browse files Browse the repository at this point in the history
  • Loading branch information
liweijie0812 authored Oct 11, 2023
1 parent a6ffa84 commit 0352a42
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 5 additions & 2 deletions style/web/components/badge/_index.less
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
padding-left: @badge-padding;
min-width: @badge-min-width;
height: @badge-height;
border-radius: calc(@badge-height / 2);
background-color: @badge-color;
line-height: @badge-height;

Expand All @@ -63,7 +62,11 @@
}
}

&--circle {
border-radius: @badge-shape-circle;
}

&--round {
border-radius: @border-radius-round;
border-radius: @badge-shape-round;
}
}
4 changes: 4 additions & 0 deletions style/web/components/badge/_var.less
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,7 @@
@badge-padding: calc((@badge-height - @badge-min-width) / 2);
// 小尺寸circle/round 左右padding
@badge-padding-s: calc((@badge-height-s - @badge-min-width) / 2);

//边框
@badge-shape-circle: calc(@badge-height / 2);
@badge-shape-round: @border-radius-default;

0 comments on commit 0352a42

Please sign in to comment.