feat: add Badge component #6573

This commit is contained in:
chenjiahan
2020-10-02 16:46:57 +08:00
parent f75c8231c6
commit 475e60b282
17 changed files with 336 additions and 46 deletions
+2 -3
View File
@@ -66,10 +66,9 @@ export default createComponent({
const renderIcon = () => {
if (slots.icon) {
return (
<div class={bem('icon-wrapper')}>
<Badge dot={props.dot} content={props.badge}>
{slots.icon()}
<Badge dot={props.dot} badge={props.badge} />
</div>
</Badge>
);
}
-4
View File
@@ -12,10 +12,6 @@
font-size: @grid-item-icon-size;
}
&__icon-wrapper {
position: relative;
}
&__text {
color: @grid-item-text-color;
font-size: @grid-item-text-font-size;