G2图表+F11窗口变化图表高度宽度改变 上代码,简单明了,记录下 1.监听resize方法 mounted() { const _this = this window.addEventListener('resize', () => { _this.getData() }, false) } 2. G2图表改变大小方法