From 493c82fc7b83b7b6d988aa3a8edd9e2ec88afa00 Mon Sep 17 00:00:00 2001 From: blobt <380255922@qq.com> Date: Fri, 9 Aug 2019 00:23:57 +0800 Subject: [PATCH] =?UTF-8?q?DataColumn=20=E5=A2=9E=E5=8A=A0=E4=BA=86width?= =?UTF-8?q?=20=E5=92=8C=20align?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kcadmin/views/category/index.php | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/kcadmin/views/category/index.php b/kcadmin/views/category/index.php index bbb6b41..6db2deb 100644 --- a/kcadmin/views/category/index.php +++ b/kcadmin/views/category/index.php @@ -18,14 +18,23 @@ $this->params['breadcrumbs'][] = $this->title; $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', + ], ], ]); ?>