zmc
2023-09-04 34257f504330191b1a698eb48b52217095db47fe
src/views/line_graph/components/LineChart.vue
@@ -53,11 +53,11 @@
    },
  },
  beforeUnmount() {
    if (this.chart) {
      this.chart.dispose();
    }
  },
  // beforeUnmount() {
  //   if (this.chart) {
  //     this.chart.dispose();
  //   }
  // },
  methods: {
    intiChart() {
      // 创建echarts实例
@@ -116,7 +116,6 @@
    // 跟页面响应式变化
    resizeChart() {
      // this.chart.resize();
      // delay(600).then(() => this.chart.resize());
      this.$nextTick(() => {
        if (this.chart) {
          this.chart.resize();
@@ -130,7 +129,7 @@
<style>
.line-chart {
  width: 100%;
  height: 35vh;
  height: 300px;
  margin-top: 25px;
}
</style>