https://segmentfault.com/a/11... @Jinkey學(xué)習(xí)這個(gè)項(xiàng)目最后引入了Element-ui我想在這個(gè)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 入門(mén)示例' },
tooltip: {},
xAxis: { data: ["襯衫","羊毛衫","雪紡衫","褲子","高跟鞋","襪子"]
},
yAxis: {},
series: [{
name: '銷量',
type: 'bar', data: [5, 20, 36, 10, 10, 20]
}]
});這樣寫(xiě)為什么會(huì)報(bào)錯(cuò)請(qǐng)問(wèn)應(yīng)該怎樣引入呢?謝謝!
如何在Vue2項(xiàng)目中引入echarts?
函數(shù)式編程
2018-09-12 13:10:51