vue引入echart错误提示Error in mounted hook: “Error: Component series.line not exists. Load it first…

  • Post author:
  • Post category:vue



安装

npm install vue-echarts

在vue中引入vue-echarts组件的时候报错了,如下图

Error in mounted hook: “Error: Component series.line not exists. Load it first

未标题-1.png


解决方法

找到vue-echarts下的components>echarts.vue

import echarts from 'echarts/lib/echarts'

改为

import echarts from 'echarts'

image.png

转载于:

https://blog.csdn.net/qq_38705449/article/details/103525670