VUE中集成echarts时 getAttribute of null错误

VUE中集成echarts时 getAttribute of null错误

出现该错误的原因是Echarts的图形容器还未生成就对其进行了初始化所造成的

解决方案:

利用Vue中的ref和$refs 来代替document.getElementById()获取该图形容器对象

 

具体其他一些情况,见https://blog.csdn.net/qq_45533841/article/details/107880309

posted @ 2020-08-12 11:15  jane_panyiyun  阅读(293)  评论(0编辑  收藏  举报