在VS环境中选择GRIDVIEW的属性,其中有columns-collections-itemstyle选择后分别对相应列设置宽度和高度。
'class' => 'yii\grid\Column', 'contentOptions' => [ 'width'=>'100' ], 'header' => '商品名称', 'content' => function ($model, $key, $index, $column){ return "".$model->name.""; } ],
".$model->name."