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 + ] + ] + ], + ] ], ]; }