想要动态设定echarts的高度,需要echarts实例中resize
页面主体及相应样式
动态设定
let chart1 = this.$refs.chart1.$echarts.init(document.getElementById("chart1"));//获取echarts实例对象
chart1.setOption(options);//重新存入设定
let chart2 = this.$refs.chart2.$echarts.init(document.getElementById("chart2"));
chart2.setOption(options2);
let chart3 = this.$refs.chart3.$echarts.init(document.getElementById("chart3"));
chart3.setOption(options3);
let height = arr.length*35