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

原文地址:https://www.cnblogs.com/jane-panyiyun/p/13489524.html