fix: 修复一些问题;entity详情页调整;
This commit is contained in:
@@ -61,7 +61,8 @@ export const entityTypeMappingKey = {
|
||||
export const unitTypes = {
|
||||
time: 'time',
|
||||
number: 'number',
|
||||
byte: 'byte'
|
||||
byte: 'byte',
|
||||
string: 'string'
|
||||
}
|
||||
|
||||
export const chartTableDefaultPageSize = 10 // table类型图表默认每页数据量
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user