<template>
  <chart style="width: 100%; height: 350px"
         ref="chart1"
         :options="orgOptions"
         :auto-resize="true"></chart>
</template>
methods: {
  resizeTheChart () {
    if (this.$refs && this.$refs.chart1) {
      this.$refs.chart1.resize();
    }
  }
},
mounted () {
  this.getInfoSucc()
  window.addEventListener("resize", this.resizeTheChart)
},
beforeDestroy () {
  window.removeEventListener("resize", this.resizeTheChart);
},
Logo

前往低代码交流专区

更多推荐