fix: Dashboard - network overview - 折线图 单位问题

This commit is contained in:
@changcode
2022-08-09 16:58:10 +08:00
parent 71a11524b0
commit 94ef9653a3
2 changed files with 24 additions and 11 deletions

View File

@@ -88,17 +88,22 @@
cursor: pointer;
padding: 16px 0 0 20px;
border-top: 4px solid transparent;
span:nth-of-type(1) {
.line-value-unit {
.line-value-unit-number {
font-family: Helvetica-Bold;
font-size: 28px;
color: #353636;
margin-right: 4px;
}
span:nth-of-type(2) {
.line-value-unit-number2 {
font-size: 0;
span {
font-size: 12px;
color: #575757;
font-weight: 400;
}
}
}
.line-value-mpackets-name {
position: relative;
display: flex;

View File

@@ -15,7 +15,15 @@
<div :class="item.class"></div>
<div class="mpackets-name">{{$t(item.name)}}</div>
</div>
<div><span>{{unitConvert(item.analysis.avg, unitTypes.number)[0]}}</span><span>{{unitConvert(item.analysis.avg, unitTypes.number)[1]}}packets/s</span></div>
<div class="line-value-unit">
<span class="line-value-unit-number">{{unitConvert(item.analysis.avg, unitTypes.number)[0]}}</span>
<span class="line-value-unit-number2">
<span>{{unitConvert(item.analysis.avg, unitTypes.number)[1]}}</span>
<span v-if="echartsType === 'Bits/s'">bps</span>
<span v-else-if="echartsType === 'Packets/s'">packets/s</span>
<span v-else-if="echartsType === 'Sessions/s'">sessions/s</span>
</span>
</div>
</div>
</div>
<div class="line-select">