From a5e82c239dc70c99dc1671e44fdefe819d9a9c3c Mon Sep 17 00:00:00 2001 From: zhangyu Date: Mon, 20 Dec 2021 11:42:48 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=20=E4=BF=AE=E6=94=B9=20chartTable?= =?UTF-8?q?=20=E6=B2=A1=E6=9C=89=E5=8C=B9=E9=85=8D=20column=E7=9A=84unit?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nezha-fronted/src/components/chart/chart/chartTable.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nezha-fronted/src/components/chart/chart/chartTable.vue b/nezha-fronted/src/components/chart/chart/chartTable.vue index 93a33b2f5..824bf91d3 100644 --- a/nezha-fronted/src/components/chart/chart/chartTable.vue +++ b/nezha-fronted/src/components/chart/chart/chartTable.vue @@ -171,6 +171,9 @@ export default { let value = null if (lodash.get(params, label)) { value = lodash.get(params, label) + if (label.indexOf('$value')) { + value = chartDataFormat.getUnit(column.unit ? column.unit : 2).compute(value, null, -1, 2) + } } return value || label }) @@ -198,9 +201,6 @@ export default { let value = null if (lodash.get(params, label)) { value = lodash.get(params, label) - if (label === '$value') { - value = lodash.get(params) - } } return value || label })