Skip to content

Commit c018b7e

Browse files
committed
fix: badge dot status position not correct #2121
1 parent bf52f73 commit c018b7e

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

components/badge/Badge.jsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,10 @@ export default {
8181
},
8282
getBadgeClassName(prefixCls) {
8383
const children = filterEmpty(this.$slots.default);
84+
const hasStatus = this.hasStatus();
8485
return classNames(prefixCls, {
85-
[`${prefixCls}-status`]: this.hasStatus(),
86+
[`${prefixCls}-status`]: hasStatus,
87+
[`${prefixCls}-dot-status`]: hasStatus && this.dot && !this.isZero(),
8688
[`${prefixCls}-not-a-wrapper`]: !children.length,
8789
});
8890
},

components/badge/style/index.less

+4
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,10 @@
114114
}
115115
}
116116

117+
&-dot-status {
118+
line-height: 1;
119+
}
120+
117121
&-zoom-appear,
118122
&-zoom-enter {
119123
animation: antZoomBadgeIn 0.3s @ease-out-back;

0 commit comments

Comments
 (0)