优化badge样式

master
yutent 2023-11-17 10:14:45 +08:00
parent 0ca65b2576
commit 6a75f89e4a
1 changed files with 10 additions and 5 deletions

View File

@ -37,14 +37,13 @@ class Badge extends Component {
.dot {
position: absolute;
z-index: 9;
left: calc(100% - 9px);
top: -8px;
left: calc(100% - 5px);
top: -6px;
display: inline-flex;
justify-content: center;
align-items: center;
min-width: 14px;
height: 14px;
padding: 0 4px;
min-width: 10px;
min-height: 10px;
border-radius: 10px;
background: var(--color-red-1);
-webkit-user-select: none;
@ -52,12 +51,18 @@ class Badge extends Component {
}
.num {
padding: 1px 3px;
line-height: 12px;
font-size: 12px;
font-style: normal;
text-align: center;
white-space: nowrap;
font-family: Tahoma, Verdana, Helvetica, Arial, sans-serif;
color: #fff;
&:not(:empty) {
min-width: 14px;
}
}
:host([hidden-value]) .dot {