vue引入echart错误提示Error in mounted hook: "Error: Component series.line not exists. Load it first
文章栏目320732070
发布时间:2019-12-04 16:31:29

概述

安装

npm install vue-echarts

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

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

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

解决方法

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

import echarts from 'echarts/lib/echarts'

改为

import echarts from 'echarts'

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