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

echarts 画图报错 this.dom.getContext is not a function的更多相关文章

  1. ECharts使用:this.dom.getContext is not a function

    echarts 画图报错 this.dom.getContext is not a function; 原因:因为在初始化echarts的时候,echarts.js规定只能使用dom原生方法获取标签, ...

  2. sql查询语句报错处理——ERROR: failed to find conversion function from unknown to text

    今天遇到写存储过程遇到的一个小问题,在查询语句中使用到了自定义的数当做列的值,然后想给这一列起一个别名 ,就直接在后面用了 as 别名.执行存储过程,存储过程报错,ERROR: failed to f ...

  3. 解决vue不相关组件之间的数据传递----vuex的学习笔记,解决报错this.$store.commit is not a function

    Vue的项目中,如果项目简单, 父子组件之间的数据传递可以使用  props 或者 $emit 等方式 进行传递 但是如果是大中型项目中,很多时候都需要在不相关的平行组件之间传递数据,并且很多数据需要 ...

  4. 【整理】解决vue不相关组件之间的数据传递----vuex的学习笔记,解决报错this.$store.commit is not a function

    解决vue不相关组件之间的数据传递----vuex的学习笔记,解决报错this.$store.commit is not a function https://www.cnblogs.com/jaso ...

  5. echarts js报错 Cannot read property 'getAttribute' of null

    本文将为您描述如何解决 eharts.js报错 Uncaught TypeError: Cannot read property 'getAttribute' of null 的问题 根据报错信息查找 ...

  6. matplotlib画图报错This figure includes Axes that are not compatible with tight_layout, so results might be incorrect.

    之前用以下代码将实验结果用matplotlib show出来 plt.plot(np.arange(len(aver_reward_list)), aver_reward_list) plt.ylab ...

  7. vue项目中使用echarts map报错Cannot read property 'push' of undefined nanhai.js

    在vue中绘制地图需要加载一个本地china.json文件,我用的是get请求的方法加载的,而不是直接import,因为我怕import请求到的部署到线上的时候会有问题.如下是get请求方法: thi ...

  8. el-table-column v-if条件渲染报错h.$scopedSlots.default is not a function

    我们在实际项目中经常会遇到el-table-column条件渲染出现报错的情况 报错内容: h.$scopedSlots.default is not a function 究其原因,是因为表格是el ...

  9. 关于这个该死的报错:TypeError - 'undefined' is not a function (evaluating '_getTagName(currWindow).toLowerCase()')

    在利用Selenium爬取页面信息的时候突然报错,第一条信息爬取的时候还好好的,第二条就不行了. 请参考网上的爬取代码: # coding=utf-8"""Created ...

  10. Vue 中提示报错 handlers[i].call is not a function解决方法

    Vue 中提示警告 TypeError: handlers[i].call is not a function at callHook (vue.esm.js?a026:2921) at Object ...

随机推荐

  1. 改变Jupyter notebook默认浏览器

    1. prompt 输入命令"jupyter notebook --generate-config" 找到jupyter_notebook_config.py所在位置(可能在&qu ...

  2. 关于window的文件路径

    跟大家分享一下,初学者的坑.事情是这样的,windows下读取文件路径失败,以下是简单python代码: 点击查看代码 with open("F:\python_file_data\pyth ...

  3. 一些sql查询的case

    1.单列去重,输出去重后条目数量 select count(distinct(`id`)) from student; 2.根据分数段统计数据条目:利用case when selectcount(ca ...

  4. 摄像头的MIPI接口、DVP接口和CSI接口

    电脑摄像头接口是USB接口,智能手机的摄像头接口是MIPI接口,还有一部分的摄像头(比如说某些支持DVP接口的硬件)是DVP接口. USB是串行通用串行总线(Universal Serial Bus) ...

  5. 在windows上远程linux (待完善)

    一.准备工具   windows linux 系统 win10 centos7 软件 远程桌面连接(自带) xrdp(epel库提供):开源的远程桌面协议(RDP)服务 二.Linux(被连接端) 2 ...

  6. 疾速瓜牛 Linux三剑客 之 sed学习与应用

    sed, 是stream editor的缩写,顾名思义,就是个非交互式行编辑器,有以下特点: 它能执行与编辑器 vi 和 ex 相同的编辑任务 sed 编辑器没有提供交互式使用方式,使用者只能在命令行 ...

  7. 2022年JMUCTF WP

    2022年JMUCTF WP crypto 2,Are you ok Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. ...

  8. sqlserver ef 分页

    sqlserver分页常用的有两种: 1.利用row_number set statistics time on; -- 分页查询(通用型) select top pageSize * from (s ...

  9. idea因时区连不上msyql8问题

    转载自https://www.cnblogs.com/lakei/p/11303174.html Connection to api@localhost failed. [08001] Could n ...

  10. C# Visual Studio等,学习地址

    Visual Studio 2022 学习地址 Visual Studio系列学习地址 Csharp11 学习地址 Csharp 学习地址 W3School公营,推广技术,免费学习 W3CSchool ...