From 88e0baf3e9204e9bfd938f76c9e9a14e02c03cfe Mon Sep 17 00:00:00 2001 From: zhangyu Date: Mon, 26 Oct 2020 10:12:05 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E4=BF=AE=E6=94=B9dashboard?= =?UTF-8?q?=E7=95=8C=E9=9D=A2=E5=B7=A6=E4=B8=8B=E8=A7=92=E7=9A=84asset=20t?= =?UTF-8?q?ype=E5=9B=BE=E8=A1=A8=E6=97=A0=E6=95=B0=E6=8D=AE=E6=97=B6?= =?UTF-8?q?=E4=BC=9A=E6=9C=89=E4=B8=80=E4=B8=AAtype=E5=9D=97=E7=9A=84?= =?UTF-8?q?=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/page/dashboard/overview/overview2.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nezha-fronted/src/components/page/dashboard/overview/overview2.vue b/nezha-fronted/src/components/page/dashboard/overview/overview2.vue index 5d85108ea..e47f87841 100644 --- a/nezha-fronted/src/components/page/dashboard/overview/overview2.vue +++ b/nezha-fronted/src/components/page/dashboard/overview/overview2.vue @@ -446,7 +446,10 @@ right: 25, icon: "circle", }; - this.assetData.typeStat && this.$refs.assetTypePie.setSeries(series, legend, legendData); + if(typeSeriesData.length===0 || !vm.assetData.typeStat || vm.assetData.typeStat.length == 0) { + legend.show=false; + } + this.assetData.typeStat && this.assetData.typeStat.length === 0 && this.$refs.assetTypePie.setSeries(series, legend, legendData); this.$refs.assetTypePie.endLoading(); } resolve()