美文网首页
vue 引入echarts报错 was not found in

vue 引入echarts报错 was not found in

作者: 最慢的是活着 | 来源:发表于2020-12-09 16:45 被阅读0次

"export 'default' (imported as 'echarts') was not found in 'echarts'

查看安装的是echarts 5.0

页面查看报"TypeError: echarts.init is not a function"错误,

但是console.log()出来的echarts.init就是function。

经测试,echarts for react不支持echarts最新版本5.0.0因此引入4.9.0

最后发现只能执行:

npm install echarts@4.9.0

才可以变更为4.9。使用就没有问题了

相关文章

网友评论

      本文标题:vue 引入echarts报错 was not found in

      本文链接:https://www.haomeiwen.com/subject/kiwhgktx.html