1200字范文,内容丰富有趣,写作的好帮手!
1200字范文 > Cannot read properties of undefined (reading ‘LinearGradient‘) echarts 找不到LinearGradient问题

Cannot read properties of undefined (reading ‘LinearGradient‘) echarts 找不到LinearGradient问题

时间:2021-10-04 04:50:54

相关推荐

Cannot read properties of undefined (reading ‘LinearGradient‘) echarts 找不到LinearGradient问题

报错如下:

"import echarts from 'echarts/lib/echarts.js'" is not supported anymore. Use "import * as echarts from 'echarts/lib/echarts.js'" instead;

vconsole.min.js?3a34:10 [Vue warn]: Error in mounted hook: "TypeError: Cannot read properties of undefined (reading 'LinearGradient')"

找不到这个问题原因很多 其中有一个原因是echarts V5版本问题 因为之前很多教程都是V4的引入方式 ,echart版本与vuecli版本不匹配,所以降低版本到V4版本即可如下

npm install echarts@4.9.0 --save 即可

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。