在Vue项目中,使用Echarts库后,运行项目,出现以下报错:
"export 'default' (imported as 'echarts') was not found in 'echarts'
引入Echarts的语句为:
import echarts from 'echarts';
将其改为
import * as echarts from 'echarts';
再次运行,正确
在Vue项目中,使用Echarts库后,运行项目,出现以下报错:
"export 'default' (imported as 'echarts') was not found in 'echarts'
引入Echarts的语句为:
import echarts from 'echarts';
将其改为
import * as echarts from 'echarts';
再次运行,正确