今天笔者报了这个警告:“export 'default' (imported as 'echarts') was not found in 'echarts
’”
现在我们就处理一下它,查了下资料说是与版本有关,最后发现该版本的导入方式不对。
先查看下我们自己的echarts的版本
,我的版本是5.1.1
,
5.0的版本
,在需要的地方导入:import * as echarts from echarts
4.0的版本
,导入方式是:import echarts from echarts
想修改echarts版本的方法:npm install echarts@4.9 --save
或cnpm install echarts@4.9 --save