https://segmentfault.com/a/11... @Jinkey学习这个项目最后引入了Element-ui我想在这个demo中插入echartsmain.jsHTML<div id="main"></div>jsexport default { data() { return {
a: 1,
msg: 'Hello Vue!'
}
},
methods: {
add() { this.a++;
console.log(this.a)
}
} // components :{ firstComponent,secondComponent }}var myChart = echarts.init(document.getElementById('main'));
console.log(myChart);
console.log(123)// 绘制图表myChart.setOption({
title: { text: 'ECharts 入门示例' },
tooltip: {},
xAxis: { data: ["衬衫","羊毛衫","雪纺衫","裤子","高跟鞋","袜子"]
},
yAxis: {},
series: [{
name: '销量',
type: 'bar', data: [5, 20, 36, 10, 10, 20]
}]
});这样写为什么会报错请问应该怎样引入呢?谢谢!
添加回答
举报
0/150
提交
取消