1. 程式人生 > 其它 >Echarts使用時的問題“export ‘default‘ (imported as ‘echarts‘) was not found in ‘echarts‘

Echarts使用時的問題“export ‘default‘ (imported as ‘echarts‘) was not found in ‘echarts‘

技術標籤:前端-後臺管理專案javascriptcssvue.jshtmlhtml5

先看清楚自己Vue的版本 不支援echarts的最新5.0版本
看下page.json裡 的版本是什麼版本
所以下載其他版本。

npm uninstall echarts //解除安裝

安裝

npm install echarts@4.9.0
npm fund
npm run dev

並且還有引用問題,
可以在這樣引用也有報錯問題
import * as echarts from "echarts";