hanbaoshan
2021-01-21 3fe6be8e6eeae41fcfabc5876cac2fddd1c860f0
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,6 +7,14 @@
  props: {
    options: {
      type: Object
    },
    defineW: {
      type: Number,
      default: 600,
    },
    defineH: {
      type: Number,
      default: 300,
    }
  },
  mounted(){
@@ -14,7 +22,7 @@
  },
  methods:{
    initLineChart(){
      this.$$nextTick(()=>{
      this.$nextTick(() => {
        let dom = this.$echarts.init(this.$refs['lineChart']);
        dom.setOption(this.options);
      })