首页 > 其他分享 >echarts 画图报错 this.dom.getContext is not a function

echarts 画图报错 this.dom.getContext is not a function

时间:2023-02-23 17:56:21浏览次数:38  
标签:function dom refs getContext 报错 echarts

 

 我给 <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上就对了  

标签:function,dom,refs,getContext,报错,echarts
From: https://www.cnblogs.com/slender-elf/p/17148924.html

相关文章