Commit 89836def by 杨树贤

修整

parent db4f1823
......@@ -19,7 +19,7 @@ class UserAddressController extends AdminController
{
return Grid::make(new UserAddress(), function (Grid $grid) {
$grid->column('id')->sortable();
$grid->column('user_id')->width(70);
$grid->user_id()->width(70);
$grid->column('country');
$grid->column('first_name');
$grid->column('last_name');
......@@ -30,8 +30,10 @@ class UserAddressController extends AdminController
$grid->column('created_at');
$grid->column('updated_at')->sortable();
$grid->filter(function (Grid\Filter $filter) {
$filter->equal('id');
$filter->equal('id')->width(3);
$filter->equal('user_id')->width(3);
$filter->equal('first_name')->width(3);
$filter->equal('last_name')->width(3);
});
});
}
......
......@@ -20,6 +20,7 @@ class AdminSetting extends Form implements LazyRenderable
'default' => 'Default',
'blue' => 'Blue',
'blue-light' => 'Blue Light',
'layui-green' => 'Layui Green',
// 'blue-dark' => 'Blue Dark',
'green' => 'Green',
];
......@@ -69,6 +70,7 @@ class AdminSetting extends Form implements LazyRenderable
'bg-success' => 'Success',
'bg-danger' => 'Danger',
'bg-dark' => 'Dark',
'' => 'None',
]);
$this->checkbox('layout.body_class', trans('admin.layout.sidebar_style'))
......
......@@ -31,6 +31,7 @@ config(['admin' => user_admin_config()]);
config(['app.locale' => config('admin.lang') ?: config('app.locale')]);
$primaryColor = Admin::color()->primary();
$primaryColor = '#009688';
Admin::style(
<<<CSS
......@@ -91,20 +92,24 @@ body.dark-mode .table-collapse table.custom-data-table.data-table tbody td {
z-index: 0;
}
.table-main table.custom-data-table thead,
.table-fixed table.custom-data-table thead tr th{
body:not(.dark-mode) .table-main table.custom-data-table thead,
body:not(.dark-mode) .table-fixed table.custom-data-table thead tr th{
position: sticky;
top: 0;
background-color: #ececf1;
}
.table-fixed table.custom-data-table thead tr th {
body:not(.dark-mode) .table-fixed table.custom-data-table thead tr th {
z-index: 99;
}
CSS
);
Dcat\Admin\Color::extend('layui-green', [
'primary' => '#009688',
'primary-darker' => '#009688',
'link' => '#009688',
]);
// 追加菜单
Admin::menu()->add(include __DIR__.'/menu.php', 0);
......@@ -135,8 +140,15 @@ HTML
Grid::resolving(function (Grid $grid) {
$grid->tableCollapse(true);
// $grid->withBorder();
$grid->disableViewButton();
$grid->disableEditButton();
$grid->toolsWithOutline(false);
$grid->paginate(20);
$grid->fixColumns(2);
$grid->setDialogFormDimensions('80%', '90%');
$grid->showQuickEditButton();
$grid->fixColumns(1);
$grid->filter(function (Grid\Filter $filter) {
$filter->panel();
});
});
<?php
return [
'fields' => [
'id' => 'ID',
'name' => 'name',
'username' => 'username',
'email' => 'email',
'http_path' => 'http_path',
'password' => 'password',
'password_confirmation' => 'password_confirmation',
'created_at' => 'created_at',
'updated_at' => 'updated_at',
'permissions' => 'permissions',
'slug' => 'slug',
'user' => 'user',
'order' => 'order',
'ip' => 'IP',
'method' => 'method',
'uri' => 'URI',
'roles' => 'roles',
'path' => 'path',
'input' => 'input',
'type' => 'type',
'user_id' => 'User Id',
'city' => 'City',
],
'labels' => [
'list' => 'list',
'edit' => 'edit',
'detail' => 'detail',
'create' => 'create',
'root' => 'root',
'scaffold' => 'scaffold',
],
'options' => [
//
],
];
<?php
return [
'titles' => [
'userAddress' => 'UserAddress',
],
];
<?php
<?php
return [
'labels' => [
'UserAddress' => 'UserAddress',
'user-address' => 'UserAddress',
],
'fields' => [
'user_id' => '用户ID',
'country' => '国家',
'first_name' => '名字',
'last_name' => '姓氏',
'address_line1' => '地址',
'address_line2' => '地址',
'city' => '城市',
'postal_code' => '邮政编码',
],
'options' => [
],
......
......@@ -2,34 +2,41 @@
return [
'fields' => [
'id' => 'ID',
'name' => '名称',
'username' => '用户名',
'email' => '邮箱',
'http_path' => 'HTTP路径',
'password' => '密码',
'id' => 'ID',
'name' => '名称',
'username' => '用户名',
'email' => '邮箱',
'http_path' => 'HTTP路径',
'password' => '密码',
'password_confirmation' => '确认密码',
'created_at' => '创建时间',
'updated_at' => '更新时间',
'permissions' => '权限',
'slug' => '标识',
'user' => '用户',
'order' => '排序',
'ip' => 'IP',
'method' => '方法',
'uri' => 'URI',
'roles' => '角色',
'path' => '路径',
'input' => '输入',
'type' => '类型',
'created_at' => '创建时间',
'updated_at' => '更新时间',
'permissions' => '权限',
'slug' => '标识',
'user' => '用户',
'order' => '排序',
'ip' => 'IP',
'method' => '方法',
'uri' => 'URI',
'roles' => '角色',
'path' => '路径',
'input' => '输入',
'type' => '类型',
'user_id' => '用户ID',
'first_name' => '名字',
'last_name' => '姓',
'city' => '城市',
'postal_code' => '邮编',
'country' => '国家',
],
'labels' => [
'list' => '列表',
'edit' => '编辑',
'detail' => '详细',
'create' => '创建',
'root' => '顶级',
'list' => '列表',
'edit' => '编辑',
'detail' => '详细',
'create' => '创建',
'root' => '顶级',
'scaffold' => '代码生成器',
'UserAddress' => '用户地址管理',
],
'options' => [
//
......
......@@ -13,6 +13,6 @@ return [
'extensions' => '扩展',
'scaffold' => '代码生成器',
'icons' => '图标',
'userAddress' => '用户地址',
'UserAddress' => '用户地址',
],
];
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment