From 6a5962fe9544005dba620b00fb36c25fe2da4e76 Mon Sep 17 00:00:00 2001
From: heyujie <516346543@qq.com>
Date: 星期二, 16 十一月 2021 15:24:46 +0800
Subject: [PATCH] 后端没修改的情况下添加默认背景图

---
 src/pages/shuohuangMonitorAnalyze/components/charts/line.vue |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/pages/shuohuangMonitorAnalyze/components/charts/line.vue b/src/pages/shuohuangMonitorAnalyze/components/charts/line.vue
index c2c3a19..ef984b6 100644
--- a/src/pages/shuohuangMonitorAnalyze/components/charts/line.vue
+++ b/src/pages/shuohuangMonitorAnalyze/components/charts/line.vue
@@ -1,5 +1,5 @@
 <template>
-  <div ref="lineChart"></div>
+  <div ref="lineChart" style="width:100%;height:100%"></div>
 </template>
 
 <script>
@@ -9,14 +9,14 @@
       type: Object
     }
   },
-  mounted(){
+  mounted() {
     this.initLineChart();
   },
-  methods:{
-    initLineChart(){
-      this.$$nextTick(()=>{
+  methods: {
+    initLineChart() {
+      this.$nextTick(() => {
         let dom = this.$echarts.init(this.$refs['lineChart']);
-        dom.setOption(this.options);
+        dom && dom.setOption(this.options);
       })
     }
   }

--
Gitblit v1.8.0