From c018b7ec0692f01355aa5a881b0a9e957da40f3d Mon Sep 17 00:00:00 2001 From: tanjinzhou <415800467@qq.com> Date: Thu, 23 Apr 2020 11:45:05 +0800 Subject: [PATCH] fix: badge dot status position not correct #2121 --- components/badge/Badge.jsx | 4 +++- components/badge/style/index.less | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/components/badge/Badge.jsx b/components/badge/Badge.jsx index ad89d6340..8531e344b 100644 --- a/components/badge/Badge.jsx +++ b/components/badge/Badge.jsx @@ -81,8 +81,10 @@ export default { }, getBadgeClassName(prefixCls) { const children = filterEmpty(this.$slots.default); + const hasStatus = this.hasStatus(); return classNames(prefixCls, { - [`${prefixCls}-status`]: this.hasStatus(), + [`${prefixCls}-status`]: hasStatus, + [`${prefixCls}-dot-status`]: hasStatus && this.dot && !this.isZero(), [`${prefixCls}-not-a-wrapper`]: !children.length, }); }, diff --git a/components/badge/style/index.less b/components/badge/style/index.less index 4a1e2e0c9..896e2b014 100644 --- a/components/badge/style/index.less +++ b/components/badge/style/index.less @@ -114,6 +114,10 @@ } } + &-dot-status { + line-height: 1; + } + &-zoom-appear, &-zoom-enter { animation: antZoomBadgeIn 0.3s @ease-out-back;