From 681c6fb5eb81ce31c6b055d7c150a5887c10468c Mon Sep 17 00:00:00 2001 From: hanbaoshan <hanbaoshan@aiotlink.com> Date: 星期三, 29 七月 2020 18:57:37 +0800 Subject: [PATCH] 算力管理样式调整 --- src/components/subComponents/SystemInfo.vue | 5 +++-- src/components/subComponents/eChartsBar.vue | 4 +++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/components/subComponents/SystemInfo.vue b/src/components/subComponents/SystemInfo.vue index 4a67a74..acb8c26 100644 --- a/src/components/subComponents/SystemInfo.vue +++ b/src/components/subComponents/SystemInfo.vue @@ -75,7 +75,7 @@ </li> </ul> </div>--> - <div class="eCharts-box" > + <div class="eCharts-box" v-if="PollData.barCharts.length>0"> <eChartsBar ref="cpuMeneryCharts" :xAxisData="PollData.barCharts"></eChartsBar> </div> </div> @@ -125,7 +125,8 @@ initCpuCharts() { this.$forceUpdate(); } - }, + } + } </script> <style lang="scss"> diff --git a/src/components/subComponents/eChartsBar.vue b/src/components/subComponents/eChartsBar.vue index 4cd7a99..ebfc650 100644 --- a/src/components/subComponents/eChartsBar.vue +++ b/src/components/subComponents/eChartsBar.vue @@ -161,12 +161,14 @@ } ] } + this.eChartsObj = echarts.init(this.$refs.cpuMenery); this.eChartsObj.setOption(options); + }, windowSizeChange() { this.eChartsObj.resize(); - }, + } } }; </script> -- Gitblit v1.8.0