angular8中 如何引入兩個echarts版本

下載echarts2和echarts4的源碼,然後在index.html中

1.先引入echarts4版本

2.然後引入echarts2版本 並且將echarts2源碼中所有echarts 替換爲echarts2

使用的時候 如果需要使用版本4  

declare const echarts: any;
echarts.init(document.getElementById('box'))

  

如果要使用版本2

declare const echarts2: any;
echarts2.init(document.getElementById('box'));

  

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章