echarts按需引入报错Error in mounted hook: “Error: Component series.bar not exists. Load it first.“
原因:bar组件需要单独引入方案:require('echarts/lib/chart/bar')例子main.js中//引入基本模板let echarts = require('echarts/lib/echarts')Vue.prototype.$echarts = echarts蜡烛图组件中// 引入折线图等组件require('echart...
·
原因:
bar组件需要单独引入
方案:
require('echarts/lib/chart/bar')
例子
main.js中
//引入基本模板
let echarts = require('echarts/lib/echarts')
Vue.prototype.$echarts = echarts
蜡烛图组件中
// 引入折线图等组件
require('echarts/lib/chart/candlestick')
require('echarts/lib/chart/bar')
// 引入提示框和title组件,图例
require('echarts/lib/component/dataset')
require('echarts/lib/component/title')
require('echarts/lib/component/tooltip')
require('echarts/lib/component/toolbox')
require('echarts/lib/component/grid')
require('echarts/lib/component/dataZoom')
require('echarts/lib/component/visualMap')
更多推荐
已为社区贡献71条内容
所有评论(0)