initChart(dom, option) {
// 初始化对象
const mychart = this.$echarts.init(dom);
// 配置赋值给实例对象
mychart.setOption(option);
// 自适应
window.addEventListener("resize", function () {
mychart.resize();
});
},
// 使用方法
this.initChart(dom, 'echarts图表配置');
02-01
451
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
11-17
9274
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
11-07
743
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交