From 3fe6be8e6eeae41fcfabc5876cac2fddd1c860f0 Mon Sep 17 00:00:00 2001 From: hanbaoshan <hanbaoshan@aiotlink.com> Date: 星期四, 21 一月 2021 11:41:07 +0800 Subject: [PATCH] 朔黄首页数据统计分析tab静态页完善 --- src/pages/shuohuangMonitorAnalyze/components/charts/line.vue | 18 +++++++++++++----- 1 files changed, 13 insertions(+), 5 deletions(-) diff --git a/src/pages/shuohuangMonitorAnalyze/components/charts/line.vue b/src/pages/shuohuangMonitorAnalyze/components/charts/line.vue index c2c3a19..04dbb1b 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:defineW+'px',height:defineH+'px'}"></div> </template> <script> @@ -7,14 +7,22 @@ props: { options: { type: Object + }, + defineW: { + type: Number, + default: 600, + }, + defineH: { + type: Number, + default: 300, } }, - mounted(){ + mounted () { this.initLineChart(); }, - methods:{ - initLineChart(){ - this.$$nextTick(()=>{ + methods: { + initLineChart () { + this.$nextTick(() => { let dom = this.$echarts.init(this.$refs['lineChart']); dom.setOption(this.options); }) -- Gitblit v1.8.0