“echarts”‘ has no exported member named ‘EChartOption‘. Did you mean ‘EChartsOption‘ instead?

Dear 丶 2022-09-05 04:29 154阅读 0赞
  1. yarn add echarts
  2. echarts 版本 5.1.2
  3. import echarts, { EChartOption } from 'echarts';

20210817105324766.png

  1. yarn add -D @types/echarts
  2. 改为
  3. import echarts, { EChartsOption } from 'echarts';

依然提示

20210817105455497.png

网上各种搜,也没找到解决方案,只了解到4和5差的很多,于是乎,我就安装4.9.0版本了

  1. yarn add echarts@4.9.0
  2. import echarts, { EChartOption } from 'echarts';
  3. 一切安好

发表评论

表情:
评论列表 (有 0 条评论,154人围观)

还没有评论,来说两句吧...

相关阅读