fix: 修复一些问题;entity详情页调整;

This commit is contained in:
chenjinsong
2021-08-09 13:38:32 +08:00
parent a7101b6a2a
commit d5742afe10
13 changed files with 137 additions and 157 deletions

View File

@@ -64,6 +64,9 @@ export function timeUnitFormatter (time, sourceUnit = 'ms', targetUnit, dot = 2)
/* 单位转换,返回转换后的[value, unit] */
// unitType = time / number / byte
export default function unitConvert (value, unitType, sourceUnit, targetUnit, dot = 2) {
if (unitType === unitTypes.string) {
return [value, '']
}
if (!Number(value) && Number(value) !== 0) {
return ['-', '']
} else {