这个跟grid的父类的布局有关,最简单的使用fit.但要看同层次有没有其它组件,有的话用vbox或hbox,把grid改成flex=1
autoHeight : true, autoWidth : true,