From 636b282be8d9923c7609be79dc4ae586344e581b Mon Sep 17 00:00:00 2001 From: weinan2087 Date: Fri, 30 Sep 2022 11:58:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9echarts=E5=9B=BE=E6=A0=87?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=98=BE=E7=A4=BA=E4=B8=BA0=E7=9A=84?= =?UTF-8?q?=E6=83=85=E5=86=B5=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/ucurrency/Index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/ucurrency/Index.vue b/src/views/ucurrency/Index.vue index d99afbe4..40d3101e 100644 --- a/src/views/ucurrency/Index.vue +++ b/src/views/ucurrency/Index.vue @@ -339,7 +339,7 @@ tarValue = data[i].value; } } - let p =Math.round((tarValue/total)*100)+'%'; + let p =total!= 0?Math.round((tarValue/total)*100)+'%':0 +'%'; return ` ${p} ${name}` } },