style: 调整单值图单位位置
This commit is contained in:
@@ -1,4 +1,8 @@
|
|||||||
.cn-chart__single-value {
|
.cn-chart__single-value {
|
||||||
|
.single-value__unit {
|
||||||
|
padding-left: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
&.cn-chart__single-value--detail-overview.cn-chart__single-value--icon-left {
|
&.cn-chart__single-value--detail-overview.cn-chart__single-value--icon-left {
|
||||||
width: unset;
|
width: unset;
|
||||||
flex: 0 0 240px;
|
flex: 0 0 240px;
|
||||||
@@ -561,7 +565,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.single-value__unit {
|
.single-value__unit {
|
||||||
font-weight: normal;
|
|
||||||
padding-right: 10px;
|
padding-right: 10px;
|
||||||
color: #333333;
|
color: #333333;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
@@ -675,7 +678,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.single-value__unit {
|
.single-value__unit {
|
||||||
font-weight: normal;
|
|
||||||
color: #333333;
|
color: #333333;
|
||||||
font-size: 22px;
|
font-size: 22px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
|||||||
@@ -94,6 +94,8 @@ export default function unitConvert (value, unitType, sourceUnit, targetUnit, do
|
|||||||
const r = (value * 100).toFixed(dot)
|
const r = (value * 100).toFixed(dot)
|
||||||
if (_.isNaN(r)) {
|
if (_.isNaN(r)) {
|
||||||
return ['-', '']
|
return ['-', '']
|
||||||
|
} else if (r == 0) {
|
||||||
|
return [0, '%']
|
||||||
} else {
|
} else {
|
||||||
return [r, '%']
|
return [r, '%']
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user