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
echo GridView::widget([
'dataProvider' => $dataProvider,
'filterSelector' => 'select[name="per-page"]',
'columns' => [
'id',
'cat_name',
[
'attribute' => 'id',
'label' => 'Id',
"width" => "30px",
'align' => 'center'
],
[
'attribute' => 'cat_name',
'label' => '类名'
],
'icon',
'icon_type',
'description:ntext',
['class' => 'yii\grid\ActionColumn'],
[
'class' => 'yii\grid\ActionColumn',
],
],
]);
?>

Loading…
Cancel
Save