echarts 画图报错 this.dom.getContext is not a function
我给 <el-card>绑定了ref,利用$refs获取 echarts实例
const echarts1 = echarts.init(this.$refs.echarts1);
结果报错了
解决办法:
<el-card style="width: 100%; height: 260px">
<div ref="echarts1" style="height: 260px"></div>
</el-card>
把ref绑定在div上就对了

浙公网安备 33010602011771号