原文:echarts 解決“There is a chart instance already initialized on the dom”問題

解決辦法: 在重復調用之前先銷毀之前的echarts if this.chart null amp amp this.chart amp amp this.chart undefined this.chart.dispose 銷毀 this.chart this. echarts.init this. el this.chart.setOption option ...

2022-03-14 18:46 0 896 推薦指數:

查看詳情

There is a chart instance already initialized on the dom!警告

使用Echarts插件的時候,多次加載會出現There is a chart instance already initialized on the dom.這個錯誤,改插件已經加載完成。 並且如果你圖表中定義了點擊方法,多次覆蓋之后,點擊方法會觸發多次 解決方法: 在方法最外層定義全局變量 ...

Wed Mar 27 18:16:00 CST 2019 0 744
 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM