style: 调整单值图单位位置

This commit is contained in:
chenjinsong
2022-04-06 15:04:55 +08:00
parent 42d6efa6ee
commit 45519a514b
2 changed files with 6 additions and 2 deletions

View File

@@ -94,6 +94,8 @@ export default function unitConvert (value, unitType, sourceUnit, targetUnit, do
const r = (value * 100).toFixed(dot)
if (_.isNaN(r)) {
return ['-', '']
} else if (r == 0) {
return [0, '%']
} else {
return [r, '%']
}