fix:1.subscriber top app 展示数据等于0时转成<0.01

This commit is contained in:
hyx
2023-12-11 11:28:47 +08:00
parent 720754bee2
commit 6c9a05f98d
3 changed files with 9 additions and 7 deletions

View File

@@ -140,8 +140,8 @@ export function getUnitType (column) {
}
/* 单位转换,返回转换后的[value, unit]type=time时若value<1ms返回<1mstype=percent时若value<0.01%,返回<0.01% */
export function valueToRangeValue (value, unitType) {
const values = unitConvert(value, unitType)
export function valueToRangeValue (value, unitType,sourceUnit, targetUnit, dot) {
const values = unitConvert(value, unitType,sourceUnit, targetUnit, dot)
if (values[0] === '-') {
return values
}