vue 啥的 都引入了
不知道怎么调用echarts啊啊啊,
<script src="/mint/vue-echarts.js"></script>
new Vue({
el: '#app',
data: {},
mounted() {
this.drawLine();
},
components:{
VueECharts,
},
methods: {
drawLine() {
console.info(this);
console.info(this.$echarts);
return;
// 基于准备好的dom,初始化echarts实例
var myChart = this.$echarts.init(document.getElementById('main'))
// 绘制图表
myChart.setOption({
title: {text: '在Vue中使用echarts'},
tooltip: {},
xAxis: {
data: ["衬衫", "羊毛衫", "雪纺衫", "裤子", "高跟鞋", "袜子"]
},
yAxis: {},
series: [{
name: '销量',
type: 'bar',
data: [5, 20, 36, 10, 10, 20]
}]
});
}
}
})
问题出现的环境背景及自己尝试过哪些方法
相关代码
// 请把代码文本粘贴到下方(请勿用图片代替代码)