From b4d2703e653bf702d705b18c20d9edb9066c7c8a Mon Sep 17 00:00:00 2001 From: ZZJ <zzjdsg2300@163.com> Date: 星期三, 03 十一月 2021 17:35:10 +0800 Subject: [PATCH] Merge branch 'master' of http://192.168.5.5:10010/r/web/vue-smart-ai --- src/pages/shuohuangMonitorAnalyze/components/charts/line.vue | 16 ++++------------ 1 files changed, 4 insertions(+), 12 deletions(-) diff --git a/src/pages/shuohuangMonitorAnalyze/components/charts/line.vue b/src/pages/shuohuangMonitorAnalyze/components/charts/line.vue index 04dbb1b..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" :style="{width:defineW+'px',height:defineH+'px'}"></div> + <div ref="lineChart" style="width:100%;height:100%"></div> </template> <script> @@ -7,24 +7,16 @@ props: { options: { type: Object - }, - defineW: { - type: Number, - default: 600, - }, - defineH: { - type: Number, - default: 300, } }, - mounted () { + mounted() { this.initLineChart(); }, methods: { - initLineChart () { + initLineChart() { this.$nextTick(() => { let dom = this.$echarts.init(this.$refs['lineChart']); - dom.setOption(this.options); + dom && dom.setOption(this.options); }) } } -- Gitblit v1.8.0