diff --git a/style/web/components/badge/_index.less b/style/web/components/badge/_index.less index 2668eb0757..87e45f3d52 100644 --- a/style/web/components/badge/_index.less +++ b/style/web/components/badge/_index.less @@ -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; @@ -63,7 +62,11 @@ } } + &--circle { + border-radius: @badge-shape-circle; + } + &--round { - border-radius: @border-radius-round; + border-radius: @badge-shape-round; } } diff --git a/style/web/components/badge/_var.less b/style/web/components/badge/_var.less index a76d24da6a..41a177f7ac 100644 --- a/style/web/components/badge/_var.less +++ b/style/web/components/badge/_var.less @@ -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;