1 let myChart = echarts.init(document.getElementById('draw_probability')) 2 let autoHeight = 条数.length * 50 + 50 //条数长度 3 myChart.getDom().style.height = autoHeight + 'px' 4 myChart.resize()
参考文章:https://www.cnblogs.com/cnsyear/p/12714359.html