let chartDom = document.getElementById('echarts1');
var oldChart = echarts.getInstanceByDom(chartDom);
if (oldChart) {
oldChart.dispose(); //销毁
}
let myChart = echarts.init(chartDom);
let option;
option = {
};
option && myChart.setOption(option);
window.addEventListener('resize', function () {
myChart.resize();
});
},
Vue echart控制台报错:There is a chart instance already initialized on the dom
最新推荐文章于 2024-06-29 14:55:36 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)