Browse Source

DataColumn 增加了width 和 align

wechat_public_accounts
blobt 5 years ago
parent
commit
493c82fc7b
  1. 17
      kcadmin/views/category/index.php

17
kcadmin/views/category/index.php

@ -18,14 +18,23 @@ $this->params['breadcrumbs'][] = $this->title;
<?php <?php
echo GridView::widget([ echo GridView::widget([
'dataProvider' => $dataProvider, 'dataProvider' => $dataProvider,
'filterSelector' => 'select[name="per-page"]',
'columns' => [ 'columns' => [
'id',
'cat_name',
[
'attribute' => 'id',
'label' => 'Id',
"width" => "30px",
'align' => 'center'
],
[
'attribute' => 'cat_name',
'label' => '类名'
],
'icon', 'icon',
'icon_type', 'icon_type',
'description:ntext', 'description:ntext',
['class' => 'yii\grid\ActionColumn'],
[
'class' => 'yii\grid\ActionColumn',
],
], ],
]); ]);
?> ?>

Loading…
Cancel
Save