From fa7044f3ccc9a91bc2bc117d1a06f650d86554f2 Mon Sep 17 00:00:00 2001
From: zhangzengfei <zhangzengfei@iotlink.com>
Date: 星期二, 15 六月 2021 16:07:16 +0800
Subject: [PATCH] 优化联动规则加载场景列表的操作

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

diff --git a/src/pages/shuohuangMonitorAnalyze/components/charts/line.vue b/src/pages/shuohuangMonitorAnalyze/components/charts/line.vue
index 04dbb1b..4e491b5 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" :style="{width:defineW+'px',height:defineH+'px'}"></div>
+  <div ref="lineChart" style="width:100%;height:100%"></div>
 </template>
 
 <script>
@@ -7,14 +7,6 @@
   props: {
     options: {
       type: Object
-    },
-    defineW: {
-      type: Number,
-      default: 600,
-    },
-    defineH: {
-      type: Number,
-      default: 300,
     }
   },
   mounted () {
@@ -24,7 +16,7 @@
     initLineChart () {
       this.$nextTick(() => {
         let dom = this.$echarts.init(this.$refs['lineChart']);
-        dom.setOption(this.options);
+        dom && dom.setOption(this.options);
       })
     }
   }

--
Gitblit v1.8.0