From 2ba24dadfb0cae8e49956876fec85503f4ee1a17 Mon Sep 17 00:00:00 2001 From: zhengkunwang223 Date: Wed, 22 Feb 2023 17:30:46 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A7=A3=E5=86=B3=E9=A6=96=E9=A1=B5=20e?= =?UTF-8?q?charts=20=E4=B8=8D=E8=83=BD=E8=87=AA=E9=80=82=E5=BA=94=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/card-with-header/index.vue | 14 -------------- frontend/src/views/home/index.vue | 8 ++++++-- 2 files changed, 6 insertions(+), 16 deletions(-) diff --git a/frontend/src/components/card-with-header/index.vue b/frontend/src/components/card-with-header/index.vue index b487cd924..55803d315 100644 --- a/frontend/src/components/card-with-header/index.vue +++ b/frontend/src/components/card-with-header/index.vue @@ -40,20 +40,6 @@ defineProps({ border-radius: 10px; } } - // span:first-child { - // background: $primary-color; - // border-radius: 7px; - // flex: none; - // order: 0; - // flex-grow: 0; - // padding: 3px; - // } - - // span:nth-child(2) { - // font-size: 18px; - // font-weight: 700; - // margin-left: 10px; - // } } div:nth-child(2) { diff --git a/frontend/src/views/home/index.vue b/frontend/src/views/home/index.vue index c5d807db7..79aec3c6d 100644 --- a/frontend/src/views/home/index.vue +++ b/frontend/src/views/home/index.vue @@ -583,8 +583,12 @@ function freshChart(chartName: string, legendDatas: any, xDatas: any, yDatas: an } function changeChartSize() { - echarts.getInstanceByDom(document.getElementById('ioChart') as HTMLElement)?.resize(); - echarts.getInstanceByDom(document.getElementById('networkChart') as HTMLElement)?.resize(); + if (document.getElementById('ioChart') != null) { + echarts.getInstanceByDom(document.getElementById('ioChart') as HTMLElement)?.resize(); + } + if (document.getElementById('networkChart') != null) { + echarts.getInstanceByDom(document.getElementById('networkChart') as HTMLElement)?.resize(); + } } onMounted(() => {