
代码:
(先安装echarts,在main.js中引入并注册进prototype)
import Vue from 'vue'
import App from './App.vue'
import router from './router'
import './plugins/element.js'
import * as echarts from 'echarts'
Vue.config.productionTip = false
Vue.prototype.$echarts = echarts
new Vue({
router,
render: h => h(App)
}).$mount('#app')
使用:
123