1.首先我们要导入echart
2.绑定js代码 div的id绑定
并在mouted内
3.下面就编写自己所需要的图(本例是柱形图)
var that = this
this.userGrowth.setOption ({
title: {
},
tooltip: {
// trigger: 'axis'
trigger: 'axis',
formatter: function(params){
var res='<div><p>'+'</p></div>'
res+='<p>'+'</p>'
res+='<p>'+ timeList[params[0].dataIndex] +'</p>'