From a3318c3e12245668b338b98cdb4fa0758366e5a1 Mon Sep 17 00:00:00 2001 From: guoapeng Date: Tue, 8 Jul 2025 00:52:44 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=B0=94=E5=8E=8B=E4=BF=9D=E7=95=99?= =?UTF-8?q?=E4=B8=A4=E4=BD=8D=E5=B0=8F=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/seal/DashboardChart.vue | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/components/seal/DashboardChart.vue b/src/components/seal/DashboardChart.vue index aad2622..2156761 100644 --- a/src/components/seal/DashboardChart.vue +++ b/src/components/seal/DashboardChart.vue @@ -17,9 +17,11 @@ watchEffect(() => { } if (myChart) { myChart.setOption({ - series: [{ - data: [{ value: pressure }], - }], + series: [ + { + data: [{ value: Number(pressure || 0).toFixed(2) }], + }, + ], }) } }) @@ -53,7 +55,7 @@ const initChart = () => { }, data: [ { - value: realTimePressure.value, + value: Number(realTimePressure.value || 0).toFixed(2), }, ], }, @@ -75,8 +77,8 @@ onUnmounted(() => {