实例完后加上
let myChart = window.Echarts.init(document.getElementById("terminal_echarts"));
this.autoHeight = this.counts * 80 + 50; // counst.length为柱状图的条数,即数据长度。
myChart.getDom().style.height = this.autoHeight + "px";
myChart.resize();