From bd5316eb099b41defac110a0c2cfcdb09e252c4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E4=BC=9F=E6=9D=B0?= <674416404@qq.com> Date: Wed, 11 Oct 2023 10:34:07 +0800 Subject: [PATCH] =?UTF-8?q?fix(badge):=20=E5=9C=86=E8=A7=92=E6=96=B9?= =?UTF-8?q?=E5=BD=A2=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- style/web/components/badge/_index.less | 7 +++++-- style/web/components/badge/_var.less | 4 ++++ 2 files changed, 9 insertions(+), 2 deletions(-) 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;