天天看點

Error in nextTick: “TypeError: Cannot read property ‘getAttribute‘ of null“

記錄一下echarts踩的坑

Error in nextTick: “TypeError: Cannot read property ‘getAttribute’ of null”

當我想循環一下 echarts圖像的時候 使用的是id綁定 getElementbyId擷取該元素就會報這個錯

解決辦法:

使用ref綁定元素 this.$refs…擷取該元素

繼續閱讀