From c9e2c8ebdadc271ea1246acd6b86e082ed12ae77 Mon Sep 17 00:00:00 2001 From: linyaostalker <602604991@qq.com> Date: Tue, 17 Dec 2019 14:04:05 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E8=AF=84=E8=AE=BA=E9=A6=96?= =?UTF-8?q?=E9=A1=B5=E5=88=97=E8=A1=A8=E6=98=BE=E7=A4=BA=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=EF=BC=8C=E9=9A=90=E8=97=8F=E4=BF=AE=E6=94=B9=E5=92=8C=E5=88=A0?= =?UTF-8?q?=E9=99=A4=E6=8C=89=E9=92=AE=EF=BC=8C=E5=BC=80=E5=8F=91=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E5=92=8C=E9=9A=90=E8=97=8F=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../shop/models/searchs/CommentSearch.php | 40 ++++++++++++++++--- 1 file changed, 34 insertions(+), 6 deletions(-) diff --git a/backend/modules/shop/models/searchs/CommentSearch.php b/backend/modules/shop/models/searchs/CommentSearch.php index ff762e5..becdd17 100644 --- a/backend/modules/shop/models/searchs/CommentSearch.php +++ b/backend/modules/shop/models/searchs/CommentSearch.php @@ -47,11 +47,6 @@ class CommentSearch extends Comment public function columns() { return [ - [ - 'class' => 'blobt\grid\CheckboxColumn', - 'width' => '2%', - 'align' => 'center' - ], 'id', 'user_id', [ @@ -70,10 +65,43 @@ class CommentSearch extends Comment }, 'label' => '状态' ], - 'created_at', + 'created_at:datetime', [ 'class' => 'iron\grid\ActionColumn', 'align' => 'center', + 'config' => [ + [ + 'name' => 'view', + 'icon' => 'list', + 'title' => '详情', + ], + [ + 'name' => 'display', + 'icon' => 'eye', + 'title' => '显示', + 'hide' => [ + 'attributes' => [ + 'status' + ], + 'values' => [ + Comment::STATUS_DISPLAY + ] + ] + ], + [ + 'name' => 'hide', + 'icon' => 'eye', + 'title' => '隐藏', + 'hide' => [ + 'attributes' => [ + 'status' + ], + 'values' => [ + Comment::STATUS_HIDE + ] + ] + ], + ] ], ]; }