From a8715c61c843c5cad931b9ce1595b136a4953679 Mon Sep 17 00:00:00 2001 From: CaIon <1808837298@qq.com> Date: Sat, 13 Jan 2024 01:27:50 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E7=9C=8B=E6=9D=BF=E6=B8=B2=E6=9F=93=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/pages/Detail/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/src/pages/Detail/index.js b/web/src/pages/Detail/index.js index 04f7b98e..fc9adea5 100644 --- a/web/src/pages/Detail/index.js +++ b/web/src/pages/Detail/index.js @@ -76,7 +76,7 @@ const Detail = (props) => { content: [ { key: datum => datum['Model'], - value: datum => renderQuotaNumberWithDigit(datum['Usage'], 4) + value: datum => renderQuotaNumberWithDigit(parseFloat(datum['Usage']), 4) } ] }, @@ -92,7 +92,7 @@ const Detail = (props) => { array.sort((a, b) => b.value - a.value); // add $ for (let i = 0; i < array.length; i++) { - array[i].value = renderQuotaNumberWithDigit(array[i].value, 4); + array[i].value = renderQuotaNumberWithDigit(parseFloat(array[i].value), 4); } return array; }