elementUI中弹出框中使用echarts

1、在dialog中使用open方法

<el-dialog
        :title="diaTitle"
        :visible.sync="dialogVisible"
        @open="open()"
      >
</el-dialog>      

2、在定时函数setTimeout中执行方法

open() {
  const t = this;
  setTimeout(() => {
    //  执行echarts画图方法
    t.drawLine();
  }, 0);
}

猜你喜欢

转载自blog.csdn.net/qq_37896578/article/details/94743448