Commit f563d93e authored by zhangyichen's avatar zhangyichen

角标修改

parent f0076150
......@@ -58,13 +58,17 @@
font-size: 10px;
background-color:#E94B3F;
color: white;
position: absolute;
position: relative;
font-weight: initial;
z-index: 999;
// display: flex;
// align-items: center;
// justify-content: center;
.center{
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);;
//display: flex;
//align-items: center;
//justify-content: center
......
<template>
<div style="position: relative;display: inline-block;width: 0px;height: 18px">
<span class="diyTag" v-if="num !== 0" v-show="num !== 'NaN'"
style="height: 14px;line-height: 14px"
<div class="diyTag" v-if="num !== 0" v-show="num !== 'NaN'"
style="height: 14px"
:style="{
'top':type === 1 ? '-22px' : type === 2 ? '-18px' : '0',
'left':type === 1 ? '-10px': type === 2 ? '-8px' : '0',
'width':num > 99 ? '24px': '14px',
}">
{{num > 99 ? '99+' : num }}
</span>
<span class="center">{{num > 99 ? '99+' : num }}</span>
</div>
</div>
</template>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment