Open SimZhou opened 4 years ago
you need add three lines into the .vue file: import Vue from 'vue' import echarts from 'echarts' //this line you miss Vue.prototype.$echarts = echarts
If you use Echarts 5, you may add the following into your chart.vue
var echarts = require('echarts');
If you use Echarts 5, you may add the following into your
chart.vue
var echarts = require('echarts');
Thanks HouseWei, you saved my day
We can do like this also, it does well
import * as echarts from 'echarts'
We can do like this also, it does well
import * as echarts from 'echarts'
It works for me. Thanks
We can do like this also, it does well我们也可以这样做,效果很好
import * as echarts from 'echarts'
It works for me too.
你好,来件已收,我会尽快给你回复的,谢谢!
Hi, so when using echarts, I followed the template from vue-element-admin, however i got TypeError: Cannot read property 'init' of undefined:
So I checked the internet and found a solution. By adding the following two lines into my
chart.vue
fixs my problem:(reference)
I am wondering why is this needed and why in vue-element-admin it does not need those two lines?
Similar issue on echarts: #187 (But mine is different, I just wanna know why I cannot do the same thing as vue-element-admin and get it right)