Skip to content

Commit c94c6da

Browse files
committed
修复操作日志控制器
1 parent 062da36 commit c94c6da

File tree

4 files changed

+10
-8
lines changed

4 files changed

+10
-8
lines changed

public/app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5294,7 +5294,7 @@ exports = module.exports = __webpack_require__(/*! ../../../../node_modules/css-
52945294

52955295

52965296
// module
5297-
exports.push([module.i, ".grid-container .table-page {\n padding: 8px 0;\n}\n.grid-container .grid-top-container {\n padding: 8px;\n display: flex;\n justify-content: space-between;\n}\n.grid-container .grid-top-container .grid-top-container-left {\n display: flex;\n align-items: center;\n}\n.grid-container .grid-top-container .grid-top-container-right {\n display: flex;\n align-items: center;\n}\n.grid-container .grid-top-container .grid-top-container-right .icon-actions {\n display: flex;\n align-items: center;\n margin-left: 5px;\n}\n.grid-container .grid-top-container .grid-top-container-right .icon-actions i {\n font-size: 20px;\n margin-right: 10px;\n}", ""]);
5297+
exports.push([module.i, ".grid-container .table-page {\n padding: 8px 0;\n}\n.grid-container .grid-top-container {\n padding: 8px;\n display: flex;\n justify-content: space-between;\n border-bottom: 1px solid #ebeef5;\n}\n.grid-container .grid-top-container .grid-top-container-left {\n display: flex;\n align-items: center;\n}\n.grid-container .grid-top-container .grid-top-container-right {\n display: flex;\n align-items: center;\n}\n.grid-container .grid-top-container .grid-top-container-right .icon-actions {\n display: flex;\n align-items: center;\n margin-left: 5px;\n}\n.grid-container .grid-top-container .grid-top-container-right .icon-actions i {\n font-size: 20px;\n margin-right: 10px;\n}", ""]);
52985298

52995299
// exports
53005300

public/mix-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"/app.js": "/app.js?id=19683e44f081c8d98093",
2+
"/app.js": "/app.js?id=36a6a47ee23854bc15ef",
33
"/manifest.js": "/manifest.js?id=d9708e48a6c10ccee4bb",
44
"/vendor.js": "/vendor.js?id=f4679ac178c0e413cb28"
55
}

resources/js/components/grid/Table.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ export default {
290290
padding: 8px;
291291
display: flex;
292292
justify-content: space-between;
293-
//border-bottom: 1px solid #ebeef5;
293+
border-bottom: 1px solid #ebeef5;
294294
.grid-top-container-left {
295295
display: flex;
296296
align-items: center;

src/Controllers/LogController.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
use SmallRuralDog\Admin\Components\Tag;
1010
use SmallRuralDog\Admin\Form;
1111
use SmallRuralDog\Admin\Grid;
12-
use SmallRuralDog\Admin\Layout\LvaContent;
1312

1413
class LogController extends AdminController
1514
{
@@ -19,15 +18,12 @@ protected function grid()
1918
{
2019
$grid = new Grid(new OperationLog());
2120
$grid->with(['user'])
22-
->hideCreateButton()
2321
->perPage(15)
2422
->quickSearch()
2523
->selection()
2624
->defaultSort('id', 'desc')
2725
->stripe()
28-
->emptyText("暂无日志")
29-
->hideEditAction()
30-
->hideViewAction();
26+
->emptyText("暂无日志");
3127
$idColumn = $grid->column('id', "ID")->width("100");
3228
$nameColumn = $grid->column('user.name', 'User', 'user_id')->help("操作用户")->sortable();
3329
$grid->columns([
@@ -39,6 +35,12 @@ protected function grid()
3935
$grid->column('ip'),
4036
$grid->column('created_at', "创建时间")->sortable()
4137
]);
38+
$grid->actions(function (Grid\Actions $actions) {
39+
$actions->hideEditAction();
40+
$actions->hideViewAction();
41+
})->toolbars(function (Grid\Toolbars $toolbars) {
42+
$toolbars->hideCreateButton();
43+
});
4244
return $grid;
4345
}
4446

0 commit comments

Comments
 (0)