这里翻译出来就是找不到对应的有效dom
<!-- 图表放大弹框 -->
<el-dialog :visible.sync="dialogVisible" width="70%">
<div class="echartDMax" id="echartDMax"></div>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="dialogVisible = false"
>确 定</el-button
>
</span>
</el-dialog>
点击按钮的时候我要弹框显示出来并且 echarts图标展示出来
所以要在 this.$nextTick 里面写echarts 展示的功能去获取dom节点
//放大图标
enlargeBtn() {
this.dialogVisible = true;
this.$nextTick(() => {
let myChart = echarts.init(document.getElementById(id));
});
},