4 Commits
v8.1.5 ... v8.0

Author SHA1 Message Date
wolfcode
cb624aa51a Update README.md 2025-03-12 14:26:49 +08:00
wolfcode
187f97a511 Update AdminController.php 2025-01-15 09:30:42 +08:00
wolfcode
f05c7ded0e Update composer.json 2025-01-09 11:50:47 +08:00
wolfcode
386b11cfc9 Update AdminController.php 2025-01-08 16:05:13 +08:00
94 changed files with 519 additions and 7760 deletions

View File

@@ -1,8 +1,5 @@
APP_DEBUG=true
# 后台系统日志开关
APP_ADMIN_SYSTEM_LOG=true
DEFAULT_TIMEZONE=Asia/Shanghai
DB_TYPE=mysql
@@ -14,16 +11,6 @@ DB_PORT=3306
DB_CHARSET=utf8mb4
DB_PREFIX=ea8_
# 限流器开关
RATE_LIMITING_STATUS=false
# Redis配置
REDIS_HOST=127.0.0.1
REDIS_PORT=6379
REDIS_PASSWORD=
REDIS_PREFIX=
REDIS_DATABASE=0
# 后台配置项组
[EASYADMIN]

View File

@@ -1,8 +1,8 @@
<div align="center" dir="auto">
<img alt="log" src="public/static/common/images/logo-8.png" />
<img alt="log" src="/public/static/common/images/logo-8.png" />
<p>
<img src="https://img.shields.io/badge/php-%3E=8.1.0-brightgreen.svg?style=for-the-badge&logo=php&colorB=ff69b4" alt="php">
<img src="https://img.shields.io/badge/php-%3E=8.0.0-brightgreen.svg?style=for-the-badge&logo=php&colorB=ff69b4" alt="php">
<img src="https://img.shields.io/badge/mysql-%3E=5.7-brightgreen.svg?style=for-the-badge&logo=mysql&colorB=blue" alt="MySQL">
<img src="https://img.shields.io/badge/thinkphp-%3E=8.0.0-brightgreen.svg?style=for-the-badge&logo=thinkphp" alt="ThinkPHP">
<img src="https://img.shields.io/badge/layui-%3E=2.9.0-brightgreen.svg?style=for-the-badge&logo=layui&colorB=orange" alt="layui">
@@ -21,11 +21,9 @@
## 项目介绍
> `EasyAdmin8` 在 [`EasyAdmin`](https://gitee.com/zhongshaofa/easyadmin) 的基础上更新 ThinkPHP 框架到 8.1+ PHP 最低版本要求不低于 8.1
>
> 2025年起 `PHP` 版本要求提升到 `8.1+`, 如果需要 `8.0` 到分支 `v8.0` 中下载
> `EasyAdmin8` 在 [`EasyAdmin`](https://gitee.com/zhongshaofa/easyadmin) 的基础上更新 ThinkPHP 框架到 8.0 PHP 最低版本要求不低于 8.0
>
> ThinkPHP v8.1+ 和 Layui v2.9.x 的快速开发的后台管理系统。
> ThinkPHP v8.0 和 Layui v2.9.x 的快速开发的后台管理系统。
>
> 项目地址:[http://easyadmin8.top](http://easyadmin8.top)
>
@@ -43,24 +41,18 @@
> EasyAdmin8 使用 Composer 来管理项目依赖。因此,在使用 EasyAdmin8 之前,请确保你的机器已经安装了 Composer。
### 通过一键安装命令
```
if [ -f /usr/bin/curl ];then curl -sSO https://easyadmin8.top/auto-install-EasyAdmin8.sh;else wget -O auto-install-EasyAdmin8.sh https://easyadmin8.top/auto-install-EasyAdmin8.sh;fi;bash auto-install-EasyAdmin8.sh
```
### 通过`git`下载安装包,`composer`安装依赖包
```
1.下载安装包
git clone https://github.com/EasyAdmin8/EasyAdmin8
git clone -b v8.0 https://github.com/EasyAdmin8/EasyAdmin8
或者
git clone https://gitee.com/EasyAdmin8/EasyAdmin8
git clone -b v8.0 https://gitee.com/EasyAdmin8/EasyAdmin8
2.安装依赖包(确保 PHP 版本 >= 8.1
2.安装依赖包(确保 PHP 版本 >= 8.0
在根目录下 composer install ,如果有报错信息可以使用命令 composer install --ignore-platform-reqs
@@ -141,4 +133,4 @@ if [ -f /usr/bin/curl ];then curl -sSO https://easyadmin8.top/auto-install-EasyA
* 如果本声明的任何部分被认为无效或不可执行,其余部分仍具有完全效力。不可执行的部分声明,并不构成我们放弃执行该声明的权利。
* 本开源项目有权随时对本声明条款及附件内容进行单方面的变更,并以消息推送、网页公告等方式予以公布,公布后立即自动生效,无需另行单独通知;若您在本声明内容公告变更后继续使用的,表示您已充分阅读、理解并接受修改后的声明内容。
* 本开源项目有权随时对本声明条款及附件内容进行单方面的变更,并以消息推送、网页公告等方式予以公布,公布后立即自动生效,无需另行单独通知;若您在本声明内容公告变更后继续使用的,表示您已充分阅读、理解并接受修改后的声明内容。

View File

@@ -4,7 +4,6 @@ use app\admin\middleware\CheckInstall;
use app\admin\middleware\CheckLogin;
use app\admin\middleware\CheckAuth;
use app\admin\middleware\SystemLog;
use app\admin\middleware\RateLimiting;
// 你可以在这里继续写你需要的路由
@@ -17,8 +16,6 @@ use app\admin\middleware\RateLimiting;
return [
'middleware' => [
// 限流中间件
RateLimiting::class,
// 判断是否已经安装后台系统
CheckInstall::class,
// 检测是否登录

View File

@@ -4,19 +4,17 @@ namespace app\admin\controller;
use app\admin\model\SystemAdmin;
use app\common\controller\AdminController;
use app\common\utils\Helper;
use think\captcha\facade\Captcha;
use think\db\exception\DataNotFoundException;
use think\db\exception\DbException;
use think\db\exception\ModelNotFoundException;
use app\Request;
use think\Response;
use Wolfcode\RateLimiting\Attributes\RateLimitingMiddleware;
class Login extends AdminController
{
protected bool $ignoreLogin = true;
protected bool $ignoreAuth = true;
public function initialize(): void
{
@@ -36,7 +34,6 @@ class Login extends AdminController
* @throws DbException
* @throws ModelNotFoundException
*/
#[RateLimitingMiddleware(key: [Helper::class, 'getIp'], seconds: 1, limit: 1, message: '请求过于频繁')]
public function index(Request $request): string
{
$captcha = env('EASYADMIN.CAPTCHA', 1);

View File

@@ -8,7 +8,11 @@ use app\admin\service\annotation\ControllerAnnotation;
use app\admin\service\annotation\NodeAnnotation;
use think\App;
#[ControllerAnnotation(title: '商品分类管理')]
/**
* Class Admin
* @package app\admin\controller\system
* @ControllerAnnotation(title="商品分类管理")
*/
class Cate extends AdminController
{

View File

@@ -4,20 +4,27 @@ namespace app\admin\controller\mall;
use app\admin\model\MallCate;
use app\admin\model\MallGoods;
use app\admin\service\annotation\MiddlewareAnnotation;
use app\common\controller\AdminController;
use app\admin\service\annotation\ControllerAnnotation;
use app\admin\service\annotation\NodeAnnotation;
use app\Request;
use think\App;
use think\db\exception\DbException;
use think\response\Json;
#[ControllerAnnotation(title: '商城商品管理')]
/**
* Class Goods
* @package app\admin\controller\mall
* @ControllerAnnotation(title="商城商品管理")
*/
class Goods extends AdminController
{
#[NodeAnnotation(ignore: ['export'])] // 过滤不需要生成的权限节点 默认 CURD 中会自动生成部分节点 可以在此处过滤
protected array $ignoreNode;
/**
* 过滤不需要生成的权限节点 默认 CURD 中会自动生成部分节点 可以在此处过滤
* @var array[]
*/
protected array $ignoreNode = ['export'];
public function __construct(App $app)
{
@@ -26,7 +33,10 @@ class Goods extends AdminController
$this->assign('cate', (new MallCate())->column('title', 'id'));
}
#[NodeAnnotation(title: '列表', auth: true)]
/**
* @NodeAnnotation(title="列表")
* @throws DbException
*/
public function index(Request $request): Json|string
{
if ($request->isAjax()) {
@@ -45,7 +55,9 @@ class Goods extends AdminController
return $this->fetch();
}
#[NodeAnnotation(title: '入库', auth: true)]
/**
* @NodeAnnotation(title="入库")
*/
public function stock(Request $request, $id): string
{
$row = $this->model->find($id);
@@ -67,9 +79,4 @@ class Goods extends AdminController
return $this->fetch();
}
#[MiddlewareAnnotation(ignore: MiddlewareAnnotation::IGNORE_LOGIN)]
public function no_check_login(Request $request): string
{
return '这里演示方法不需要经过登录验证';
}
}

View File

@@ -10,9 +10,14 @@ use app\admin\service\annotation\ControllerAnnotation;
use app\admin\service\annotation\NodeAnnotation;
use app\Request;
use think\App;
use think\db\exception\DbException;
use think\response\Json;
#[ControllerAnnotation(title: '管理员管理')]
/**
* Class Admin
* @package app\admin\controller\system
* @ControllerAnnotation(title="管理员管理")
*/
class Admin extends AdminController
{
@@ -28,7 +33,10 @@ class Admin extends AdminController
$this->assign('auth_list', $this->model->getAuthList());
}
#[NodeAnnotation(title: '列表', auth: true)]
/**
* @NodeAnnotation(title="列表")
* @throws DbException
*/
public function index(Request $request): Json|string
{
if ($request->isAjax()) {
@@ -56,7 +64,9 @@ class Admin extends AdminController
return $this->fetch();
}
#[NodeAnnotation(title: '添加', auth: true)]
/**
* @NodeAnnotation(title="添加")
*/
public function add(Request $request): string
{
if ($request->isPost()) {
@@ -77,7 +87,9 @@ class Admin extends AdminController
return $this->fetch();
}
#[NodeAnnotation(title: '编辑', auth: true)]
/**
* @NodeAnnotation(title="编辑")
*/
public function edit(Request $request, $id = 0): string
{
$row = $this->model->find($id);
@@ -104,7 +116,9 @@ class Admin extends AdminController
return $this->fetch();
}
#[NodeAnnotation(title: '设置密码', auth: true)]
/**
* @NodeAnnotation(title="编辑")
*/
public function password(Request $request, $id): string
{
$row = $this->model->find($id);
@@ -133,7 +147,9 @@ class Admin extends AdminController
return $this->fetch();
}
#[NodeAnnotation(title: '删除', auth: true)]
/**
* @NodeAnnotation(title="删除")
*/
public function delete(Request $request): void
{
$this->checkPostRequest();
@@ -154,7 +170,9 @@ class Admin extends AdminController
$save ? $this->success('删除成功') : $this->error('删除失败');
}
#[NodeAnnotation(title: '属性修改', auth: true)]
/**
* @NodeAnnotation(title="属性修改")
*/
public function modify(Request $request): void
{
$this->checkPostRequest();

View File

@@ -11,7 +11,11 @@ use app\admin\service\annotation\NodeAnnotation;
use app\Request;
use think\App;
#[ControllerAnnotation(title: '角色权限管理', auth: true)]
/**
* @ControllerAnnotation(title="角色权限管理")
* Class Auth
* @package app\admin\controller\system
*/
class Auth extends AdminController
{
@@ -26,7 +30,9 @@ class Auth extends AdminController
$this->model = new SystemAuth();
}
#[NodeAnnotation(title: '授权', auth: true)]
/**
* @NodeAnnotation(title="授权")
*/
public function authorize(Request $request, $id): string
{
$row = $this->model->find($id);
@@ -39,7 +45,9 @@ class Auth extends AdminController
return $this->fetch();
}
#[NodeAnnotation(title: '授权保存', auth: true)]
/**
* @NodeAnnotation(title="授权保存")
*/
public function saveAuthorize(Request $request): void
{
$this->checkPostRequest();

View File

@@ -9,9 +9,14 @@ use app\admin\service\annotation\ControllerAnnotation;
use app\admin\service\annotation\NodeAnnotation;
use app\Request;
use think\App;
use think\facade\Cache;
use think\response\Json;
#[ControllerAnnotation(title: '系统配置管理')]
/**
* Class Config
* @package app\admin\controller\system
* @ControllerAnnotation(title="系统配置管理")
*/
class Config extends AdminController
{
@@ -23,13 +28,17 @@ class Config extends AdminController
$this->assign('editor_types', config('admin.editor_types'));
}
#[NodeAnnotation(title: '列表', auth: true)]
/**
* @NodeAnnotation(title="列表")
*/
public function index(Request $request): Json|string
{
return $this->fetch();
}
#[NodeAnnotation(title: '保存', auth: true)]
/**
* @NodeAnnotation(title="保存")
*/
public function save(Request $request): void
{
$this->checkPostRequest();

View File

@@ -3,6 +3,7 @@
namespace app\admin\controller\system;
use app\admin\service\curd\BuildCurd;
use app\admin\service\curd\exceptions\TableException;
use app\common\controller\AdminController;
use app\admin\service\annotation\ControllerAnnotation;
use app\admin\service\annotation\NodeAnnotation;
@@ -14,16 +15,24 @@ use think\facade\Db;
use think\helper\Str;
use think\response\Json;
#[ControllerAnnotation(title: 'CURD可视化管理')]
/**
* @ControllerAnnotation(title="CURD可视化管理")
* @package app\admin\controller\system
*/
class CurdGenerate extends AdminController
{
#[NodeAnnotation(title: '列表', auth: true)]
/**
* @NodeAnnotation(title="列表")
*/
public function index(Request $request): Json|string
{
return $this->fetch();
}
#[NodeAnnotation(title: '操作', auth: true)]
/**
* @NodeAnnotation(title="操作")
* @throws TableException
*/
public function save(Request $request, string $type = ''): ?Json
{
if (!$request->isAjax()) $this->error();
@@ -137,7 +146,6 @@ class CurdGenerate extends AdminController
$command = $request->post('command', '');
if (empty($command)) $this->error('请输入命令');
$commandExp = explode(' ', $command);
$commandExp = array_values(array_filter($commandExp));
try {
$output = Console::call('curd', [...$commandExp]);

View File

@@ -3,7 +3,6 @@
namespace app\admin\controller\system;
use app\admin\model\SystemLog;
use app\admin\service\annotation\MiddlewareAnnotation;
use app\admin\service\tool\CommonTool;
use app\common\controller\AdminController;
use app\admin\service\annotation\ControllerAnnotation;
@@ -16,16 +15,24 @@ use think\db\exception\PDOException;
use think\facade\Db;
use think\response\Json;
#[ControllerAnnotation(title: '操作日志管理')]
/**
* @ControllerAnnotation(title="操作日志管理")
* Class Auth
* @package app\admin\controller\system
*/
class Log extends AdminController
{
protected array $ignoreLog = ['record'];
public function __construct(App $app)
{
parent::__construct($app);
$this->model = new SystemLog();
}
#[NodeAnnotation(title: '列表', auth: true)]
/**
* @NodeAnnotation(title="列表")
*/
public function index(Request $request): Json|string
{
if ($request->isAjax()) {
@@ -53,7 +60,9 @@ class Log extends AdminController
return $this->fetch();
}
#[NodeAnnotation(title: '导出', auth: true)]
/**
* @NodeAnnotation(title="导出")
*/
public function export(): bool
{
if (env('EASYADMIN.IS_DEMO', false)) {
@@ -87,47 +96,9 @@ class Log extends AdminController
return Excel::exportData($list, $header, $fileName, 'xlsx');
}
#[NodeAnnotation(title: '删除指定日志', auth: true)]
public function deleteMonthLog(Request $request)
{
if (!$request->isAjax()) {
return $this->fetch();
}
if ($this->isDemo) $this->error('演示环境下不允许操作');
$monthsAgo = $request->param('month/d', 0);
if ($monthsAgo < 1) $this->error('月份错误');
$currentDate = new \DateTime();
$currentDate->modify("-$monthsAgo months");
$dbPrefix = env('DB_PREFIX');
$dbLike = "{$dbPrefix}system_log_";
$tables = Db::query("SHOW TABLES LIKE '$dbLike%'");
$threshold = date('Ym', strtotime("-$monthsAgo month"));
$tableNames = [];
try {
foreach ($tables as $table) {
$tableName = current($table);
if (!preg_match("/^$dbLike\d{6}$/", $tableName)) continue;
$datePart = substr($tableName, -6);
$issetTable = Db::query("SHOW TABLES LIKE '$tableName'");
if (!$issetTable) continue;
if ($datePart - $threshold <= 0) {
Db::execute("DROP TABLE `$tableName`");
$tableNames[] = $tableName;
}
}
}catch (PDOException) {
}
if (empty($tableNames)) $this->error('没有需要删除的表');
$this->success('操作成功 - 共删除 ' . count($tableNames) . ' 张表<br/>' . implode('<br>', $tableNames));
}
#[MiddlewareAnnotation(ignore: MiddlewareAnnotation::IGNORE_LOG)]
#[NodeAnnotation(title: '框架日志', auth: true, ignore: NodeAnnotation::IGNORE_NODE)]
/**
* @NodeAnnotation(title="框架日志")
*/
public function record(): Json|string
{
return (new \Wolfcode\PhpLogviewer\thinkphp\LogViewer())->fetch();

View File

@@ -11,9 +11,14 @@ use app\admin\service\annotation\NodeAnnotation;
use app\common\controller\AdminController;
use app\Request;
use think\App;
use think\db\exception\DbException;
use think\response\Json;
#[ControllerAnnotation(title: '菜单管理')]
/**
* Class Menu
* @package app\admin\controller\system
* @ControllerAnnotation(title="菜单管理",auth=true)
*/
class Menu extends AdminController
{
@@ -28,7 +33,10 @@ class Menu extends AdminController
$this->model = new SystemMenu();
}
#[NodeAnnotation(title: '列表', auth: true)]
/**
* @NodeAnnotation(title="列表")
* @throws DbException
*/
public function index(Request $request): Json|string
{
if ($request->isAjax()) {
@@ -48,7 +56,9 @@ class Menu extends AdminController
return $this->fetch();
}
#[NodeAnnotation(title: '添加', auth: true)]
/**
* @NodeAnnotation(title="添加")
*/
public function add(Request $request): string
{
$id = $request->param('id');
@@ -82,7 +92,9 @@ class Menu extends AdminController
return $this->fetch();
}
#[NodeAnnotation(title: '编辑', auth: true)]
/**
* @NodeAnnotation(title="编辑")
*/
public function edit(Request $request, $id = 0): string
{
$row = $this->model->find($id);
@@ -117,7 +129,9 @@ class Menu extends AdminController
return $this->fetch();
}
#[NodeAnnotation(title: '删除', auth: true)]
/**
* @NodeAnnotation(title="删除")
*/
public function delete(Request $request): void
{
$this->checkPostRequest();
@@ -137,7 +151,9 @@ class Menu extends AdminController
}
}
#[NodeAnnotation(title: '属性修改', auth: true)]
/**
* @NodeAnnotation(title="属性修改")
*/
public function modify(Request $request): void
{
$this->checkPostRequest();
@@ -174,7 +190,9 @@ class Menu extends AdminController
$this->success('保存成功');
}
#[NodeAnnotation(title: '添加菜单提示', auth: true)]
/**
* @NodeAnnotation(title="添加菜单提示")
*/
public function getMenuTips(): Json
{
$node = input('get.keywords');

View File

@@ -10,9 +10,14 @@ use app\admin\service\annotation\NodeAnnotation;
use app\admin\service\NodeService;
use app\Request;
use think\App;
use think\db\exception\DbException;
use think\response\Json;
#[ControllerAnnotation(title: '系统节点管理')]
/**
* @ControllerAnnotation(title="系统节点管理")
* Class Node
* @package app\admin\controller\system
*/
class Node extends AdminController
{
@@ -22,7 +27,10 @@ class Node extends AdminController
$this->model = new SystemNode();
}
#[NodeAnnotation(title: '列表', auth: true)]
/**
* @NodeAnnotation(title="列表")
* @throws DbException
*/
public function index(Request $request): Json|string
{
if ($request->isAjax()) {
@@ -44,7 +52,9 @@ class Node extends AdminController
return $this->fetch();
}
#[NodeAnnotation(title: '系统节点更新', auth: true)]
/**
* @NodeAnnotation(title="系统节点更新")
*/
public function refreshNode($force = 0): void
{
@@ -84,7 +94,9 @@ class Node extends AdminController
$this->success('节点更新成功');
}
#[NodeAnnotation(title: '清除失效节点', auth: true)]
/**
* @NodeAnnotation(title="清除失效节点")
*/
public function clearNode(): void
{
$this->checkPostRequest();

View File

@@ -9,7 +9,11 @@ use app\admin\service\annotation\ControllerAnnotation;
use app\admin\service\annotation\NodeAnnotation;
use think\App;
#[ControllerAnnotation(title: '快捷入口管理')]
/**
* @ControllerAnnotation(title="快捷入口管理")
* Class Quick
* @package app\admin\controller\system
*/
class Quick extends AdminController
{

View File

@@ -8,7 +8,10 @@ use app\admin\service\annotation\ControllerAnnotation;
use app\admin\service\annotation\NodeAnnotation;
use think\App;
#[ControllerAnnotation(title: '上传文件管理')]
/**
* @ControllerAnnotation(title="上传文件管理")
* @package app\admin\controller\system
*/
class Uploadfile extends AdminController
{

View File

View File

@@ -1,12 +0,0 @@
<?php
namespace app\admin\entity;
use app\common\entity\BaseEntity;
/**
* ThinkORM 4.0 实体模型案例
* 可与 Model 并存 或者 单独使用
* @package app\admin\entity
*/
class Test extends BaseEntity {}

View File

@@ -7,7 +7,6 @@ use app\Request;
use Closure;
use ReflectionClass;
use ReflectionException;
use app\admin\service\annotation\MiddlewareAnnotation;
class CheckLogin
{
@@ -25,25 +24,13 @@ class CheckLogin
$controllerClass = 'app\\admin\\controller\\' . $controller;
$classObj = new ReflectionClass($controllerClass);
$properties = $classObj->getDefaultProperties();
// 整个控制器是否忽略登录
$ignoreLogin = $properties['ignoreLogin'] ?? false;
$adminUserInfo = session('admin');
if (!$ignoreLogin) {
$ignoreAuth = $properties['ignoreAuth'] ?? false;
$adminUserInfo = session('admin');
if (!$ignoreAuth) {
$noNeedCheck = $properties['noNeedCheck'] ?? [];
if (in_array($action, $noNeedCheck)) {
return $next($request);
}
try {
$reflectionMethod = new \ReflectionMethod($controllerClass, $action);
$attributes = $reflectionMethod->getAttributes(MiddlewareAnnotation::class);
foreach ($attributes as $attribute) {
$annotation = $attribute->newInstance();
$_ignore = (array)$annotation->ignore;
// 控制器中的某个方法忽略登录
if (in_array('LOGIN', $_ignore)) return $next($request);
}
}catch (\Throwable) {
}
if (empty($adminUserInfo)) {
return redirect(__url('login/index'));
}

View File

@@ -1,45 +0,0 @@
<?php
namespace app\admin\middleware;
use app\common\traits\JumpTrait;
use app\Request;
use Closure;
use Wolfcode\RateLimiting\Bootstrap;
class RateLimiting
{
use JumpTrait;
/**
* 启用限流器需要开启Redis
* @param Request $request
* @param Closure $next
* @return mixed
*/
public function handle(Request $request, Closure $next): mixed
{
// 是否启用限流器
if (!env('RATE_LIMITING_STATUS', false)) return $next($request);
if ($request->method() == 'GET') return $next($request);
$controller = $request->controller();
$module = app('http')->getName();
$appNamespace = config('app.app_namespace');
$controllerClass = "app\\{$module}\\controller\\{$controller}{$appNamespace}";
$controllerClass = str_replace('.', '\\', $controllerClass);
$action = $request->action();
try {
Bootstrap::init($controllerClass, $action, [
# Redis 相关配置
'host' => env('REDIS_HOST', '127.0.0.1'),
'port' => (int)env('REDIS_PORT', 6379),
'password' => env('REDIS_PASSWORD', ''),
'prefix' => env('REDIS_PREFIX', ''),
'database' => (int)env('REDIS_DATABASE', 0),
]);
}catch (\Throwable $exception) {
$this->error($exception->getMessage());
}
return $next($request);
}
}

View File

@@ -3,12 +3,14 @@
namespace app\admin\middleware;
use app\admin\service\annotation\ControllerAnnotation;
use app\admin\service\annotation\MiddlewareAnnotation;
use app\admin\service\annotation\NodeAnnotation;
use app\admin\service\SystemLogService;
use app\common\traits\JumpTrait;
use app\Request;
use ReflectionClass;
use Closure;
use Doctrine\Common\Annotations\AnnotationReader;
use Doctrine\Common\Annotations\DocParser;
use ReflectionException;
class SystemLog
@@ -32,8 +34,7 @@ class SystemLog
public function handle(Request $request, Closure $next)
{
$response = $next($request);
if (!env('APP_ADMIN_SYSTEM_LOG', true)) return $response;
$params = $request->param();
$params = $request->param();
if (isset($params['s'])) unset($params['s']);
foreach ($params as $key => $val) {
in_array($key, $this->sensitiveParams) && $params[$key] = "***********";
@@ -57,25 +58,17 @@ class SystemLog
$_controller = ucfirst($pathInfoExp[1] ?? '');
$className = $_controller ? "app\admin\controller\\{$_name}\\{$_controller}" : "app\admin\controller\\{$_name}";
if ($_name && $_action) {
$reflectionMethod = new \ReflectionMethod($className, $_action);
$attributes = $reflectionMethod->getAttributes(MiddlewareAnnotation::class);
foreach ($attributes as $attribute) {
$annotation = $attribute->newInstance();
$_ignore = (array)$annotation->ignore;
if (in_array('log', array_map('strtolower', $_ignore))) return $response;
}
$controllerTitle = $nodeTitle = '';
$controllerAttributes = (new \ReflectionClass($className))->getAttributes(ControllerAnnotation::class);
$actionAttributes = $reflectionMethod->getAttributes(NodeAnnotation::class);
foreach ($controllerAttributes as $controllerAttribute) {
$controllerAnnotation = $controllerAttribute->newInstance();
$controllerTitle = $controllerAnnotation->title ?? '';
}
foreach ($actionAttributes as $actionAttribute) {
$actionAnnotation = $actionAttribute->newInstance();
$nodeTitle = $actionAnnotation->title ?? '';
}
$title = $controllerTitle . ' - ' . $nodeTitle;
$reflectionClass = new \ReflectionClass($className);
$properties = $reflectionClass->getDefaultProperties();
$ignoreLog = $properties['ignoreLog'] ?? [];
if (in_array($_action, $ignoreLog)) return $response;
$parser = new DocParser();
$parser->setIgnoreNotImportedAnnotations(true);
$reader = new AnnotationReader($parser);
$controllerAnnotation = $reader->getClassAnnotation($reflectionClass, ControllerAnnotation::class);
$reflectionAction = $reflectionClass->getMethod($_action);
$nodeAnnotation = $reader->getMethodAnnotation($reflectionAction, NodeAnnotation::class);
$title = $controllerAnnotation->title . ' - ' . $nodeAnnotation->title;
}
}catch (\Throwable $exception) {
}

View File

@@ -2,20 +2,38 @@
namespace app\admin\service\annotation;
use Attribute;
use Doctrine\Common\Annotations\Annotation\Attributes;
use Doctrine\Common\Annotations\Annotation\Required;
use Doctrine\Common\Annotations\Annotation\Target;
/**
* controller 节点注解类
* Class ControllerAnnotation
*
* @Annotation
* @Target("CLASS")
* @Attributes({
* @Attribute("title", type="string"),
* })
*
* @since 2.0
*/
#[Attribute]
final class ControllerAnnotation
{
/**
* @param string $title
* @param bool $auth 是否需要权限
* @param string|array $ignore
* Route group prefix for the controller
*
* @Required()
*
* @var string
*/
public function __construct(public string $title = '', public bool $auth = true, public string|array $ignore = '')
{
}
public $title = '';
/**
* 是否开启权限控制
* @Enum({true,false})
* @var bool
*/
public $auth = true;
}

View File

@@ -1,19 +0,0 @@
<?php
namespace app\admin\service\annotation;
use Attribute;
#[Attribute(Attribute::IS_REPEATABLE | Attribute::TARGET_METHOD)]
final class MiddlewareAnnotation
{
/** 过滤日志 */
const IGNORE_LOG = 'LOG';
/** 免登录 */
const IGNORE_LOGIN = 'LOGIN';
public function __construct(public string $type = '', public string|array $ignore = '')
{
}
}

View File

@@ -2,24 +2,32 @@
namespace app\admin\service\annotation;
use Attribute;
use Doctrine\Common\Annotations\Annotation\Attributes;
/**
* action 节点注解类
* 创建节点注解类
*
* @Annotation
* @Target({"METHOD","CLASS"})
* @Attributes({
* @Attribute("time", type = "int")
* })
*/
#[Attribute(Attribute::IS_REPEATABLE | Attribute::TARGET_METHOD| Attribute::TARGET_PROPERTY)]
final class NodeAnnotation
{
/** 过滤节点 */
const IGNORE_NODE = 'NODE';
/**
* @param string $title
* @param bool $auth 是否需要权限
* @param string|array $ignore
* 节点名称
* @Required()
* @var string
*/
public function __construct(public string $title = '', public bool $auth = true, public string|array $ignore = '')
{
}
public string $title;
/**
* 是否开启权限控制
* @Enum({true,false})
* @var bool
*/
public bool $auth = true;
}

View File

@@ -68,22 +68,20 @@ class Node
// 遍历读取所有方法的注释的参数信息
foreach ($methods as $method) {
// 忽略掉不需要的节点
$property = $reflectionClass->getProperty('ignoreNode');
$propertyAttributes = $property->getAttributes(NodeAnnotation::class);
if (!empty($propertyAttributes[0])) {
$propertyAttribute = $propertyAttributes[0]->newInstance();
if (in_array($method->name, $propertyAttribute->ignore)) continue;
}
// 忽略的节点
$properties = $reflectionClass->getDefaultProperties();
$ignoreNode = $properties['ignoreNode'] ?? [];
if (!empty($ignoreNode)) if (in_array($method->name, $ignoreNode)) continue;
$attributes = $reflectionClass->getMethod($method->name)->getAttributes(NodeAnnotation::class);
foreach ($attributes as $attribute) {
$annotation = $attribute->newInstance();
if (!empty($annotation->ignore)) if (strtolower($annotation->ignore) == 'node') continue;
// 读取NodeAnnotation的注解
$nodeAnnotation = $reader->getMethodAnnotation($method, NodeAnnotation::class);
if (!empty($nodeAnnotation)) {
$actionTitle = !empty($nodeAnnotation->title) ? $nodeAnnotation->title : null;
$actionAuth = !empty($nodeAnnotation->auth) ? $nodeAnnotation->auth : false;
$actionList[] = [
'node' => $controllerFormat . '/' . $method->name,
'title' => $annotation->title ?? null,
'is_auth' => $annotation->auth ?? false,
'title' => $actionTitle,
'is_auth' => $actionAuth,
'type' => 2,
];
}
@@ -91,17 +89,16 @@ class Node
// 方法非空才读取控制器注解
if (!empty($actionList)) {
// 读取Controller的注解
$attributes = $reflectionClass->getAttributes(ControllerAnnotation::class);
foreach ($attributes as $attribute) {
$controllerAnnotation = $attribute->newInstance();
$nodeList[] = [
'node' => $controllerFormat,
'title' => $controllerAnnotation->title ?? null,
'is_auth' => $controllerAnnotation->auth ?? false,
'type' => 1,
];
}
$nodeList = array_merge($nodeList, $actionList);
$controllerAnnotation = $reader->getClassAnnotation($reflectionClass, ControllerAnnotation::class);
$controllerTitle = !empty($controllerAnnotation->title) ? $controllerAnnotation->title : null;
$controllerAuth = !empty($controllerAnnotation->auth) ? $controllerAnnotation->auth : false;
$nodeList[] = [
'node' => $controllerFormat,
'title' => $controllerTitle,
'is_auth' => $controllerAuth,
'type' => 1,
];
$nodeList = array_merge($nodeList, $actionList);
}
}

View File

@@ -300,7 +300,7 @@ class BuildCurd
}
}
$this->tableComment = $this->table;
} catch (Exception $e) {
}catch (Exception $e) {
throw new TableException($e->getMessage());
}
@@ -308,11 +308,11 @@ class BuildCurd
$nodeArray = explode('_', $this->table);
if (count($nodeArray) == 1) {
$this->controllerFilename = ucfirst($nodeArray[0]);
} else {
}else {
foreach ($nodeArray as $k => $v) {
if ($k == 0) {
$this->controllerFilename = "{$v}{$this->DS}";
} else {
}else {
$this->controllerFilename .= ucfirst($v);
}
}
@@ -396,7 +396,7 @@ class BuildCurd
}
$this->relationArray[$relationTable] = $relation;
$this->selectFields[] = $foreignKey;
} catch (Exception $e) {
}catch (Exception $e) {
throw new TableException($e->getMessage());
}
return $this;
@@ -652,6 +652,7 @@ class BuildCurd
if (in_array($key, ['describe', 'content', 'details'])) {
$this->editorFields[] = $key;
}
}
return $this;
}
@@ -705,7 +706,7 @@ class BuildCurd
}
}
!empty($formatDefine) && $colum['define'] = $formatDefine;
} else {
}else {
$colum['define'] = $define;
}
}
@@ -729,8 +730,7 @@ class BuildCurd
$this->getTemplate("controller{$this->DS}select"),
[
'name' => $name,
]
);
]);
return $selectCode;
}
@@ -754,8 +754,7 @@ class BuildCurd
[
'name' => $name,
'values' => $values,
]
);
]);
return $selectCode;
}
@@ -776,8 +775,7 @@ class BuildCurd
'name' => "notes['$field']",
'relation' => $relation,
'values' => $field,
]
);
]);
return $selectCode;
}
@@ -796,8 +794,7 @@ class BuildCurd
[
'name' => "notes['$field']",
'select' => $select,
]
);
]);
}
/**
@@ -816,8 +813,7 @@ class BuildCurd
'field' => $field,
'name' => "notes['$field']",
'select' => $select,
]
);
]);
}
/**
@@ -836,8 +832,7 @@ class BuildCurd
'field' => $field,
'name' => "notes['$field']",
'select' => $select,
]
);
]);
}
/**
@@ -950,6 +945,7 @@ class BuildCurd
$this->tableColumns[$field]['formType'] = 'select';
continue;
}
}
// 关联表
@@ -1022,6 +1018,7 @@ class BuildCurd
}
return $this;
}
/**
@@ -1034,21 +1031,20 @@ class BuildCurd
$constructRelation = '';
if (empty($this->relationArray)) {
$controllerIndexMethod = '';
} else {
}else {
$relationCode = '';
foreach ($this->relationArray as $key => $val) {
$relation = CommonTool::lineToHump($key);
$relationCode = "->withJoin('{$relation}', 'LEFT')\r";
if (!empty($val['bindSelectField']) && !empty($val['primaryKey'])) {
$constructRelation = '$notes["' . lcfirst($val['foreignKey']) . '"] = \app\admin\model\\' . $val['modelFilename'] . '::column("' . $val['bindSelectField'] . '", "' . $val['primaryKey'] . '");';
$constructRelation = '$notes["' . lcfirst($val['modelFilename']) . ucfirst($val['bindSelectField']) . '"] = \app\admin\model\\' . $val['modelFilename'] . '::column("' . $val['bindSelectField'] . '", "' . $val['primaryKey'] . '");';
}
}
$controllerIndexMethod = CommonTool::replaceTemplate(
$this->getTemplate("controller{$this->DS}indexMethod"),
[
'relationIndexMethod' => $relationCode,
]
);
]);
}
$selectList = '';
// foreach ($this->relationArray as $relation) {
@@ -1075,8 +1071,7 @@ class BuildCurd
'indexMethod' => $controllerIndexMethod,
'selectList' => $selectList,
'constructRelation' => $constructRelation,
]
);
]);
$this->fileList[$controllerFile] = $controllerValue;
return $this;
}
@@ -1134,8 +1129,7 @@ class BuildCurd
'relationList' => $relationList,
// 'selectList' => $selectList,
'selectArrays' => CommonTool::replaceArrayString(var_export($selectArrays, true)),
]
);
]);
$this->fileList[$modelFile] = $modelValue;
@@ -1171,8 +1165,7 @@ class BuildCurd
'relationList' => '',
'selectList' => '',
'selectArrays' => "[]",
]
);
]);
$this->fileList[$relationModelFile] = $relationModelValue;
}
return $this;
@@ -1191,8 +1184,7 @@ class BuildCurd
[
'controllerUrl' => $this->controllerUrl,
'notesScript' => $this->formatNotesScript(),
]
);
]);
$this->fileList[$viewIndexFile] = $viewIndexValue;
// 添加页面
@@ -1210,44 +1202,42 @@ class BuildCurd
// 根据formType去获取具体模板
if ($val['formType'] == 'image') {
$templateFile = "view{$this->DS}module{$this->DS}image";
} elseif ($val['formType'] == 'images') {
}elseif ($val['formType'] == 'images') {
$templateFile = "view{$this->DS}module{$this->DS}images";
$define = $val['define'] ?? '|';
} elseif ($val['formType'] == 'file') {
}elseif ($val['formType'] == 'file') {
$templateFile = "view{$this->DS}module{$this->DS}file";
} elseif ($val['formType'] == 'files') {
}elseif ($val['formType'] == 'files') {
$templateFile = "view{$this->DS}module{$this->DS}files";
$define = $val['define'] ?? '|';
} elseif ($val['formType'] == 'editor') {
}elseif ($val['formType'] == 'editor') {
$templateFile = "view{$this->DS}module{$this->DS}editor";
$val['default'] = '""';
} elseif ($val['formType'] == 'date') {
}elseif ($val['formType'] == 'date') {
$templateFile = "view{$this->DS}module{$this->DS}date";
$define = 'date';
} elseif ($val['formType'] == 'datetime') {
}elseif ($val['formType'] == 'datetime') {
$templateFile = "view{$this->DS}module{$this->DS}date";
$define = 'datetime';
} elseif ($val['formType'] == 'radio') {
}elseif ($val['formType'] == 'radio') {
$templateFile = "view{$this->DS}module{$this->DS}radio";
if (!empty($val['define'])) {
$define = $this->buildRadioView($field, '{in name="k" value="' . $val['default'] . '"}checked=""{/in}');
}
} elseif ($val['formType'] == 'checkbox') {
}elseif ($val['formType'] == 'checkbox') {
$templateFile = "view{$this->DS}module{$this->DS}checkbox";
if (!empty($val['define'])) {
$define = $this->buildCheckboxView($field, '{in name="k" value="' . $val['default'] . '"}checked=""{/in}');
}
} elseif ($val['formType'] == 'select') {
}elseif ($val['formType'] == 'select') {
$templateFile = "view{$this->DS}module{$this->DS}select";
if (isset($val['bindRelation'])) {
$define = $this->buildOptionView($field);
} elseif (!empty($val['define'])) {
$define = $this->buildOptionView($val['bindRelation']);
}elseif (!empty($val['define'])) {
$define = $this->buildOptionView($field);
}
} elseif ($field == 'remark' || $val['formType'] == 'textarea') {
}elseif ($field == 'remark' || $val['formType'] == 'textarea') {
$templateFile = "view{$this->DS}module{$this->DS}textarea";
} elseif ($field == 'sort') {
$templateFile = "view{$this->DS}module{$this->DS}sort";
}
$addFormList .= CommonTool::replaceTemplate(
$this->getTemplate($templateFile),
@@ -1257,15 +1247,13 @@ class BuildCurd
'required' => $this->buildRequiredHtml($val['required']),
'value' => $val['default'],
'define' => $define,
]
);
]);
}
$viewAddValue = CommonTool::replaceTemplate(
$this->getTemplate("view{$this->DS}form"),
[
'formList' => $addFormList,
]
);
]);
$this->fileList[$viewAddFile] = $viewAddValue;
@@ -1286,43 +1274,41 @@ class BuildCurd
// 根据formType去获取具体模板
if ($val['formType'] == 'image') {
$templateFile = "view{$this->DS}module{$this->DS}image";
} elseif ($val['formType'] == 'images') {
}elseif ($val['formType'] == 'images') {
$templateFile = "view{$this->DS}module{$this->DS}images";
} elseif ($val['formType'] == 'file') {
}elseif ($val['formType'] == 'file') {
$templateFile = "view{$this->DS}module{$this->DS}file";
} elseif ($val['formType'] == 'files') {
}elseif ($val['formType'] == 'files') {
$templateFile = "view{$this->DS}module{$this->DS}files";
} elseif ($val['formType'] == 'editor') {
}elseif ($val['formType'] == 'editor') {
$templateFile = "view{$this->DS}module{$this->DS}editor";
$value = '$row["' . $field . '"]';
} elseif ($val['formType'] == 'date') {
}elseif ($val['formType'] == 'date') {
$templateFile = "view{$this->DS}module{$this->DS}date";
$define = 'date';
} elseif ($val['formType'] == 'datetime') {
}elseif ($val['formType'] == 'datetime') {
$templateFile = "view{$this->DS}module{$this->DS}date";
$define = 'datetime';
} elseif ($val['formType'] == 'radio') {
}elseif ($val['formType'] == 'radio') {
$templateFile = "view{$this->DS}module{$this->DS}radio";
if (!empty($val['define'])) {
$define = $this->buildRadioView($field, '{in name="k" value="$row.' . $field . '"}checked=""{/in}');
}
} elseif ($val['formType'] == 'checkbox') {
}elseif ($val['formType'] == 'checkbox') {
$templateFile = "view{$this->DS}module{$this->DS}checkbox";
if (!empty($val['define'])) {
$define = $this->buildCheckboxView($field, '{in name="k" value="$row.' . $field . '"}checked=""{/in}');
}
} elseif ($val['formType'] == 'select') {
}elseif ($val['formType'] == 'select') {
$templateFile = "view{$this->DS}module{$this->DS}select";
if (isset($val['bindRelation'])) {
$define = $this->buildOptionView($field, '{in name="k" value="$row.' . $field . '"}selected=""{/in}');
} elseif (!empty($val['define'])) {
$define = $this->buildOptionView($val['bindRelation'], '{in name="k" value="$row.' . $field . '"}selected=""{/in}');
}elseif (!empty($val['define'])) {
$define = $this->buildOptionView($field, '{in name="k" value="$row.' . $field . '"}selected=""{/in}');
}
} elseif ($field == 'remark' || $val['formType'] == 'textarea') {
}elseif ($field == 'remark' || $val['formType'] == 'textarea') {
$templateFile = "view{$this->DS}module{$this->DS}textarea";
$value = '{$row.' . $field . '|raw|default=\'\'}';
} elseif ($field == 'sort') {
$templateFile = "view{$this->DS}module{$this->DS}sort";
}
$editFormList .= CommonTool::replaceTemplate(
$this->getTemplate($templateFile),
@@ -1332,15 +1318,13 @@ class BuildCurd
'required' => $this->buildRequiredHtml($val['required']),
'value' => $value,
'define' => $define,
]
);
]);
}
$viewEditValue = CommonTool::replaceTemplate(
$this->getTemplate("view{$this->DS}form"),
[
'formList' => $editFormList,
]
);
]);
$this->fileList[$viewEditFile] = $viewEditValue;
return $this;
@@ -1361,33 +1345,31 @@ class BuildCurd
if ($val['formType'] == 'image') {
$templateValue = "{field: '{$field}', title: '{$val['comment']}', templet: ea.table.image}";
} elseif ($val['formType'] == 'datetime') {
$templateValue = "{field: '{$field}', search: 'range', title: '{$val['comment']}'}";
} elseif ($val['formType'] == 'images') {
}elseif ($val['formType'] == 'images') {
continue;
} elseif ($val['formType'] == 'file') {
}elseif ($val['formType'] == 'file') {
$templateValue = "{field: '{$field}', title: '{$val['comment']}', templet: ea.table.url}";
} elseif ($val['formType'] == 'files') {
}elseif ($val['formType'] == 'files') {
continue;
} elseif ($val['formType'] == 'editor') {
}elseif ($val['formType'] == 'editor') {
continue;
} elseif (in_array($field, $this->switchFields)) {
}elseif (in_array($field, $this->switchFields)) {
if (!empty($val['define'])) {
$templateValue = "{field: '{$field}', search: 'select', selectList: notes?.{$field} || {}, title: '{$val['comment']}', templet: ea.table.switch}";
} else {
}else {
$templateValue = "{field: '{$field}', title: '{$val['comment']}', templet: ea.table.switch}";
}
} elseif (in_array($val['formType'], ['select', 'checkbox', 'radio', 'switch'])) {
}elseif (in_array($val['formType'], ['select', 'checkbox', 'radio', 'switch'])) {
if (!empty($val['define'])) {
$templateValue = "{field: '{$field}', search: 'select', selectList: notes?.{$field} || {}, title: '{$val['comment']}'}";
} else {
}else {
$templateValue = "{field: '{$field}', title: '{$val['comment']}'}";
}
} elseif ($field == 'remark') {
}elseif ($field == 'remark') {
$templateValue = "{field: '{$field}', title: '{$val['comment']}', templet: ea.table.text}";
} elseif (in_array($field, $this->sortFields)) {
}elseif (in_array($field, $this->sortFields)) {
$templateValue = "{field: '{$field}', title: '{$val['comment']}', edit: 'text'}";
} else {
}else {
$templateValue = "{field: '{$field}', title: '{$val['comment']}'}";
}
@@ -1400,27 +1382,27 @@ class BuildCurd
foreach ($tableVal['tableColumns'] as $field => $val) {
if ($val['formType'] == 'image') {
$templateValue = "{field: '{$table}.{$field}', title: '{$val['comment']}', templet: ea.table.image}";
} elseif ($val['formType'] == 'images') {
}elseif ($val['formType'] == 'images') {
continue;
} elseif ($val['formType'] == 'file') {
}elseif ($val['formType'] == 'file') {
$templateValue = "{field: '{$table}.{$field}', title: '{$val['comment']}', templet: ea.table.url}";
} elseif ($val['formType'] == 'files') {
}elseif ($val['formType'] == 'files') {
continue;
} elseif ($val['formType'] == 'editor') {
}elseif ($val['formType'] == 'editor') {
continue;
} elseif ($val['formType'] == 'select') {
}elseif ($val['formType'] == 'select') {
$templateValue = "{field: '{$table}.{$field}', title: '{$val['comment']}'}";
} elseif ($field == 'remark') {
}elseif ($field == 'remark') {
$templateValue = "{field: '{$table}.{$field}', title: '{$val['comment']}', templet: ea.table.text}";
} elseif (in_array($field, $this->switchFields)) {
}elseif (in_array($field, $this->switchFields)) {
$templateValue = "{field: '{$table}.{$field}', title: '{$val['comment']}', templet: ea.table.switch}";
} elseif (in_array($field, $this->sortFields)) {
}elseif (in_array($field, $this->sortFields)) {
$templateValue = "{field: '{$table}.{$field}', title: '{$val['comment']}', edit: 'text'}";
} else {
$templateValue = "";
}else {
$templateValue = "{field: '{$table}.{$field}', title: '{$val['comment']}'}";
}
if ($templateValue) $indexCols .= $this->formatColsRow("{$templateValue},\r");
$indexCols .= $this->formatColsRow("{$templateValue},\r");
}
}
@@ -1431,8 +1413,7 @@ class BuildCurd
[
'controllerUrl' => $this->controllerUrl,
'indexCols' => $indexCols,
]
);
]);
$this->fileList[$jsFile] = $jsValue;
return $this;
}
@@ -1557,4 +1538,4 @@ class BuildCurd
{
return ' let notes = JSON.parse(\'{$notes|json_encode=256|raw}\');';
}
}
}

View File

@@ -7,7 +7,9 @@ use app\admin\service\annotation\ControllerAnnotation;
use app\admin\service\annotation\NodeAnnotation;
use think\App;
#[ControllerAnnotation(title: '{{controllerAnnotation}}')]
/**
* @ControllerAnnotation(title="{{controllerAnnotation}}")
*/
class {{controllerName}} extends AdminController
{

View File

@@ -1,7 +0,0 @@
<div class="layui-form-item">
<label class="layui-form-label">{{comment}}</label>
<div class="layui-input-block">
<input type="number" name="{{field}}" class="layui-input" lay-affix="number" {{required}} placeholder="请输入{{comment}}" value="{{value}}">
</div>
</div>

View File

@@ -17,7 +17,9 @@ use think\response\Json;
trait Curd
{
#[NodeAnnotation(title: '列表', auth: true)]
/**
* @NodeAnnotation(title="列表")
*/
public function index(Request $request): Json|string
{
if ($request->isAjax()) {
@@ -38,7 +40,9 @@ trait Curd
return $this->fetch();
}
#[NodeAnnotation(title: '添加', auth: true)]
/**
* @NodeAnnotation(title="添加")
*/
public function add(Request $request): string
{
if ($request->isPost()) {
@@ -57,7 +61,9 @@ trait Curd
return $this->fetch();
}
#[NodeAnnotation(title: '编辑', auth: true)]
/**
* @NodeAnnotation(title="编辑")
*/
public function edit(Request $request, $id = 0): string
{
$row = $this->model->find($id);
@@ -79,7 +85,9 @@ trait Curd
return $this->fetch();
}
#[NodeAnnotation(title: '删除', auth: true)]
/**
* @NodeAnnotation(title="删除")
*/
public function delete(Request $request): void
{
// 如果不是id作为主键 请在对应的控制器中覆盖重写
@@ -95,7 +103,9 @@ trait Curd
$save ? $this->success('删除成功') : $this->error('删除失败');
}
#[NodeAnnotation(title: '导出', auth: true)]
/**
* @NodeAnnotation(title="导出")
*/
public function export()
{
if (env('EASYADMIN.IS_DEMO', false)) {
@@ -123,7 +133,9 @@ trait Curd
return Excel::exportData($list, $header, $fileName, 'xlsx');
}
#[NodeAnnotation(title: '属性修改', auth: true)]
/**
* @NodeAnnotation(title="属性修改")
*/
public function modify(Request $request): void
{
$this->checkPostRequest();

View File

@@ -26,6 +26,15 @@
</ul>
<ul class="layui-nav layui-layout-right">
<!-- <li class="layui-nav-item" lay-unselect>-->
<!-- <div class="layui-form ws-header-theme" lay-filter="header-theme">-->
<!-- <input type="checkbox" name="theme-mode" id="ID-header-theme-mode" lay-filter="header-theme-mode" lay-skin="switch">-->
<!-- <div lay-checkbox>-->
<!-- <i class="layui-icon layui-icon-moon"></i> |-->
<!-- <i class="layui-icon layui-icon-light"></i>-->
<!-- </div>-->
<!-- </div>-->
<!-- </li>-->
<li class="layui-nav-item" lay-unselect>
<a href="http://easyadmin8.top" target="_blank"><i class="fa fa-home"></i></a>
</li>
@@ -38,15 +47,6 @@
<li class="layui-nav-item mobile layui-hide-xs" lay-unselect>
<a href="javascript:;" data-check-screen="full"><i class="fa fa-arrows-alt"></i></a>
</li>
<li class="layui-nav-item" lay-unselect>
<div class="layui-form ws-header-theme" lay-filter="header-theme">
<input type="checkbox" name="theme-mode" lay-filter="header-theme-mode" lay-skin="switch">
<div lay-checkbox>
<i class="layui-icon layui-icon-moon"></i> |
<i class="layui-icon layui-icon-light"></i>
</div>
</div>
</li>
<li class="layui-nav-item layuimini-setting">
<a href="javascript:;">
<img src="{:session('admin.head_img')}" class="layui-nav-img" width="50" height="50">

View File

@@ -180,7 +180,7 @@
<td>Github</td>
<td>
<a href="https://github.com/wolf-leo/easyAdmin8" target="_blank">
<i class="layui-icon layui-icon-github layui-font-20 layui-font-gray layui-text"></i>
<i class="layui-icon layui-icon-github layui-font-20 layui-font-cyan layui-text"></i>
</a>
</td>
</tr>
@@ -192,7 +192,7 @@
<div class="layui-card">
<div class="layui-card-header"><i class="fa fa-paper-plane-o icon"></i>作者心语</div>
<div class="layui-card-body layui-text">
<p>
<p class="layui-font-cyan">
本模板基于layui2.9.x以及font-awesome-4.7.0进行实现。
<a class="layui-btn layui-btn-xs layui-btn-danger" style="vertical-align: baseline;" target="_blank" href="http://layui.dev/docs">layui文档</a>
</p>

View File

@@ -6,7 +6,6 @@
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="icon" href="{:sysConfig('site', 'site_ico')}" type="image/x-icon">
<!--[if lt IE 9]>
<script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
<script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
@@ -27,6 +26,7 @@
EDITOR_TYPE: "{$adminEditor|default='wangEditor'}",
};
</script>
<script src="/static/plugs/xmSelect/xm-select.js" charset="utf-8"></script>
<script src="/static/plugs/layui-v2.x/layui.js" charset="utf-8"></script>
<script src="/static/plugs/require-2.3.6/require.js" charset="utf-8"></script>
<script src="/static/config-admin.js?v={$version}" charset="utf-8"></script>

View File

@@ -22,7 +22,7 @@
<div class="layui-form-item">
<label class="layui-form-label">分类排序</label>
<div class="layui-input-block">
<input type="number" name="sort" class="layui-input" lay-affix="number" placeholder="请输入分类排序" value="0">
<input type="number" name="sort" class="layui-input" placeholder="请输入分类排序" value="0">
</div>
</div>

View File

@@ -22,7 +22,7 @@
<div class="layui-form-item">
<label class="layui-form-label">分类排序</label>
<div class="layui-input-block">
<input type="number" name="sort" class="layui-input" lay-affix="number" placeholder="请输入分类排序" value="{$row.sort|default=''}">
<input type="number" name="sort" class="layui-input" placeholder="请输入分类排序" value="{$row.sort|default=''}">
</div>
</div>

View File

@@ -78,7 +78,7 @@
<div class="layui-form-item">
<label class="layui-form-label">分类排序</label>
<div class="layui-input-block">
<input type="number" name="sort" class="layui-input" lay-affix="number" placeholder="请输入分类排序" value="0">
<input type="number" name="sort" class="layui-input" placeholder="请输入分类排序" value="0">
</div>
</div>

View File

@@ -78,7 +78,7 @@
<div class="layui-form-item">
<label class="layui-form-label">分类排序</label>
<div class="layui-input-block">
<input type="number" name="sort" class="layui-input" lay-affix="number" placeholder="请输入分类排序" value="{$row.sort|default=''}">
<input type="number" name="sort" class="layui-input" placeholder="请输入分类排序" value="{$row.sort|default=''}">
</div>
</div>

View File

@@ -25,7 +25,7 @@
<div class="layui-form-item">
<label class="layui-form-label">入库数量</label>
<div class="layui-input-block">
<input type="number" name="stock" class="layui-input" lay-affix="number" lay-verify="required" placeholder="请输入入库数量" value="0">
<input type="number" name="stock" class="layui-input" lay-verify="required" placeholder="请输入入库数量" value="0">
</div>
</div>

View File

@@ -1,23 +0,0 @@
<div class="layuimini-container">
<form id="app-form" class="layui-form layuimini-form">
<div class="layui-form-item">
<div class="layui-input-group">
<div class="layui-input-prefix layui-input-split">删除</div>
<label>
<input type="number" name="month" lay-affix="number" placeholder="" min="1" class="layui-input" value="3">
</label>
<div class="layui-input-suffix layui-input-split">个月前的日志</div>
</div>
</div>
<div class="hr-line"></div>
<div class="layui-form-item text-center">
<button type="button" class="layui-btn" lay-submit lay-filter="submit">提交</button>
</div>
</form>
</div>

View File

@@ -2,7 +2,6 @@
<div class="layuimini-main">
<table id="currentTable" class="layui-table layui-hide"
data-auth-record="{:auth('system.log/record')}"
data-auth-deleteMonthLog="{:auth('system.log/deleteMonthLog')}"
lay-filter="currentTable">
</table>
</div>

View File

@@ -53,7 +53,7 @@
<div class="layui-form-item">
<label class="layui-form-label">菜单排序</label>
<div class="layui-input-block">
<input type="number" name="sort" lay-reqtext="菜单排序不能为空" placeholder="请输入菜单排序" value="0" class="layui-input" lay-affix="number">
<input type="number" name="sort" lay-reqtext="菜单排序不能为空" placeholder="请输入菜单排序" value="0" class="layui-input">
</div>
</div>

View File

@@ -53,7 +53,7 @@
<div class="layui-form-item">
<label class="layui-form-label">菜单排序</label>
<div class="layui-input-block">
<input type="number" name="sort" lay-reqtext="菜单排序不能为空" placeholder="请输入菜单排序" value="{$row.sort|default=''}" class="layui-input" lay-affix="number">
<input type="number" name="sort" lay-reqtext="菜单排序不能为空" placeholder="请输入菜单排序" value="{$row.sort|default=''}" class="layui-input">
</div>
</div>

View File

@@ -31,7 +31,7 @@
<div class="layui-form-item">
<label class="layui-form-label">菜单排序</label>
<div class="layui-input-block">
<input type="number" name="sort" lay-reqtext="菜单排序不能为空" placeholder="请输入菜单排序" value="0" class="layui-input" lay-affix="number">
<input type="number" name="sort" lay-reqtext="菜单排序不能为空" placeholder="请输入菜单排序" value="0" class="layui-input">
</div>
</div>

View File

@@ -31,7 +31,7 @@
<div class="layui-form-item">
<label class="layui-form-label">菜单排序</label>
<div class="layui-input-block">
<input type="number" name="sort" lay-reqtext="菜单排序不能为空" placeholder="请输入菜单排序" value="{$row.sort|default=''}" class="layui-input" lay-affix="number">
<input type="number" name="sort" lay-reqtext="菜单排序不能为空" placeholder="请输入菜单排序" value="{$row.sort|default=''}" class="layui-input">
</div>
</div>

View File

@@ -44,12 +44,6 @@ class AdminController extends BaseController
'title',
];
/**
* 过滤节点更新
* @var array
*/
protected array $ignoreNode = [];
/**
* 不导出的字段信息
* @var array
@@ -249,7 +243,7 @@ class AdminController extends BaseController
'version' => env('APP_DEBUG') ? time() : ConfigService::getVersion(),
'adminUploadUrl' => url('ajax/upload', [], false),
'adminEditor' => sysConfig('site', 'editor_type') ?: 'wangEditor',
'iframeOpenTop' => sysConfig('site', 'iframe_open_top') ?: 0,
'iframeOpenTop' => sysConfig('site', 'iframe_open_top') ?: 0,
];
View::assign($data);
}
@@ -265,4 +259,4 @@ class AdminController extends BaseController
}
}
}
}

View File

@@ -1,22 +0,0 @@
<?php
namespace app\common\entity;
use think\Entity;
use think\model\type\DateTime;
class BaseEntity extends Entity
{
protected function getOptions(): array
{
return [
'type' => [
'create_time' => DateTime::class,
'update_time' => DateTime::class,
'delete_time' => DateTime::class,
],
];
}
}

View File

@@ -2,7 +2,6 @@
namespace app\common\service;
use app\admin\service\annotation\NodeAnnotation;
use app\common\constants\AdminConstant;
use think\facade\Db;
@@ -53,7 +52,7 @@ class AuthService
/***
* 构造方法
* AuthService constructor.
* @param null $adminId
* @param null $adminId
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
@@ -69,7 +68,7 @@ class AuthService
/**
* 检测检测权限
* @param null $node
* @param null $node
* @return bool
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
@@ -88,7 +87,7 @@ class AuthService
// 判断是否需要获取当前节点
if (empty($node)) {
$node = $this->getCurrentNode();
}else {
} else {
$node = $this->parseNodeStr($node);
}
// 判断是否加入节点控制,优先获取缓存信息
@@ -107,30 +106,9 @@ class AuthService
if (in_array($node, $this->adminNode)) {
return true;
}
if ($this->checkNodeAnnotationAttrAuth($node)) return true;
return false;
}
protected function checkNodeAnnotationAttrAuth(string $node): bool
{
$bool = false;
$controller = request()->controller();
try {
$controllerExplode = explode('.', $controller);
[$_name, $_controller] = $controllerExplode;
$nodeExplode = explode('/', $node);
$action = end($nodeExplode);
$reflectionClass = new \ReflectionClass("app\admin\controller\\{$_name}\\{$_controller}");
$attributes = $reflectionClass->getMethod($action)->getAttributes(NodeAnnotation::class);
foreach ($attributes as $attribute) {
$annotation = $attribute->newInstance();
$bool = $annotation->auth === false;
}
}catch (\Throwable) {
}
return $bool;
}
/**
* 获取当前节点
* @return string
@@ -152,25 +130,25 @@ class AuthService
{
$nodeList = [];
$adminInfo = Db::name($this->config['system_admin'])
->where([
'id' => $this->adminId,
'status' => 1,
])->find();
->where([
'id' => $this->adminId,
'status' => 1,
])->find();
if (!empty($adminInfo) && !empty($adminInfo['auth_ids'])) {
$buildAuthSql = Db::name($this->config['system_auth'])
->distinct(true)
->whereIn('id', $adminInfo['auth_ids'])
->field('id')
->buildSql(true);
->distinct(true)
->whereIn('id', $adminInfo['auth_ids'])
->field('id')
->buildSql(true);
$buildAuthNodeSql = Db::name($this->config['system_auth_node'])
->distinct(true)
->where("auth_id IN {$buildAuthSql}")
->field('node_id')
->buildSql(true);
->distinct(true)
->where("auth_id IN {$buildAuthSql}")
->field('node_id')
->buildSql(true);
$nodeList = Db::name($this->config['system_node'])
->distinct(true)
->where("id IN {$buildAuthNodeSql}")
->column('node');
->distinct(true)
->where("id IN {$buildAuthNodeSql}")
->column('node');
}
return $nodeList;
}
@@ -184,7 +162,7 @@ class AuthService
public function getNodeList()
{
return Db::name($this->config['system_node'])
->column('id,node,title,type,is_auth', 'node');
->column('id,node,title,type,is_auth', 'node');
}
/**
@@ -199,13 +177,13 @@ class AuthService
public function getAdminInfo()
{
return Db::name($this->config['system_admin'])
->where('id', $this->adminId)
->find();
->where('id', $this->adminId)
->find();
}
/**
* 驼峰转下划线规则
* @param string $node
* @param string $node
* @return string
*/
public function parseNodeStr($node)

View File

@@ -1,28 +0,0 @@
<?php
declare(strict_types = 1);
namespace app\common\utils;
class Helper
{
/**
* 获取当前IP地址
* @return string
*/
public static function getIp(): string
{
return request()->ip();
}
/**
* 获取当前登录用户ID
* @return int|string
*/
public static function getAdminUid(): int|string
{
return session('admin.id') ?: 0;
}
}

View File

@@ -22,8 +22,8 @@ class Install extends BaseController
// $this->redirect('/');
$isInstall = true;
$errorInfo = '已安装系统,如需重新安装请删除文件:/config/install/lock/install.lock或者删除 /install 路由';
}elseif (version_compare(phpversion(), '8.1.0', '<')) {
$errorInfo = 'PHP版本不能小于8.1.0';
}elseif (version_compare(phpversion(), '8.0.0', '<')) {
$errorInfo = 'PHP版本不能小于8.0.0';
}elseif (!extension_loaded("PDO")) {
$errorInfo = '当前未开启PDO无法进行安装';
}
@@ -31,17 +31,9 @@ class Install extends BaseController
$errorInfo = '.env 文件不存在,请先配置 .env 文件';
}
if (!$request->isAjax()) {
$envInfo = [
'DB_HOST' => $isInstall ? '' : env('DB_HOST', '127.0.0.1'),
'DB_NAME' => $isInstall ? '' : env('DB_NAME', 'easyadmin8'),
'DB_USER' => $isInstall ? '' : env('DB_USER', 'root'),
'DB_PASS' => $isInstall ? '' : env('DB_PASS', 'root'),
'DB_PORT' => $isInstall ? '' : env('DB_PORT', 3306),
'DB_PREFIX' => $isInstall ? '' : env('DB_PREFIX', 'ea8_'),
];
$currentHost = '://';
$result = compact('errorInfo', 'currentHost', 'isInstall', 'envInfo');
return view('index@install/index', $result);
$result = compact('errorInfo', 'currentHost', 'isInstall');
return view('index/install/index', $result);
}
if ($errorInfo) $this->error($errorInfo);
$charset = 'utf8mb4';

View File

@@ -20,26 +20,25 @@
}
],
"require": {
"php": ">=8.1.0",
"php": ">=8.0.0",
"topthink/framework": "^8.0",
"topthink/think-orm": "^4.0",
"topthink/think-orm": "^3.0",
"topthink/think-multi-app": "^1.1.0",
"topthink/think-view": "^2.0",
"topthink/think-view": "2.0.0",
"topthink/think-captcha": "^3.0",
"topthink/think-filesystem": "^2.0",
"aliyuncs/oss-sdk-php": "^2.6",
"qcloud/cos-sdk-v5": "^2.6",
"jianyan74/php-excel": "^1.0.2",
"doctrine/annotations": "^2.0.0",
"doctrine/annotations": "^1.13",
"phpoffice/phpspreadsheet": "^1.28",
"myclabs/php-enum": "^1.8",
"qiniu/php-sdk": "^7.11.0",
"wolf-leo/phplogviewer": "^0.11.3",
"wolfcode/authenticator": "^0.0.6",
"wolfcode/rate-limiting": "^0.1.0",
"ext-json": "*",
"qiniu/php-sdk": "v7.11.0",
"ext-mysqli": "*",
"ext-pdo": "*"
"ext-pdo": "*",
"wolf-leo/phplogviewer": "^0.11.3",
"wolfcode/authenticator": "^0.0.6"
},
"require-dev": {
"symfony/var-dumper": ">=4.2",

View File

@@ -235,11 +235,11 @@ VALUES ('64', 'oss_domain', 'upload', '填你的', '阿里云oss访问域名', '
INSERT INTO `ea_system_config`
VALUES ('65', 'logo_title', 'site', 'EasyAdmin', 'LOGO标题', '0', null, null);
INSERT INTO `ea_system_config`
VALUES ('66', 'logo_image', 'site', '/static/common/images/logo-1.png', 'logo图片', '0', null, null);
VALUES ('66', 'logo_image', 'site', '/favicon.ico', 'logo图片', '0', null, null);
INSERT INTO `ea_system_config`
VALUES ('68', 'site_name', 'site', 'EasyAdmin后台系统', '站点名称', '0', null, null);
INSERT INTO `ea_system_config`
VALUES ('69', 'site_ico', 'site', '/favicon.ico', '浏览器图标', '0', null, null);
VALUES ('69', 'site_ico', 'site', '填你的', '浏览器图标', '0', null, null);
INSERT INTO `ea_system_config`
VALUES ('70', 'site_copyright', 'site', '填你的', '版权信息', '0', null, null);
INSERT INTO `ea_system_config`

1
log.md
View File

@@ -1,3 +1,2 @@
> 2025年01月01日 `PHP` 要求升级到 `8.1+`
>
> 2024年05月 更新 `EasyAdmin8` 重置版,多处语法、写法进行变更

View File

@@ -1,59 +0,0 @@
.green {
color: #11c26d !important;
}
.red {
color: #ff4c52 !important;
}
.cyan {
color: #0bb2d4 !important;
}
.purple {
color: #9463f7 !important;
}
.blue {
color: #3e8ef7 !important;
}
.orange {
color: #eb6709 !important;
}
.indigo {
color: #6610f2 !important;
}
.pink {
color: #e83e8c !important;
}
.teal {
color: #20c997 !important;
}
.white {
color: #fff !important;
}
.gray {
color: #6c757d !important;
}
.gray-dark {
color: #343a40 !important;
}
.secondary {
color: #6c757d !important;
}
.yellow {
color: rgb(255, 214, 102) !important;
}
.magenta {
color: #eb2f96 !important;
}

View File

@@ -1,6 +1,3 @@
body {
background: #333333;
}
.demo {
padding-top: 20px;
@@ -173,6 +170,7 @@ body {
}
.container {
background: #333333;
position: static;
font-size: 12px;
height: 100%;

View File

@@ -1,23 +1,21 @@
@import url("../../plugs/layui-v2.x/css/layui.css");
@import url("../../plugs/font-awesome-4.7.0/css/font-awesome.min.css");
@import url("../css/color.css");
@import url("../css/themes/index.css");
@import url("../css/iconfont.css");
html,
body {
font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
html, body {
height: 100%;
background: #f2f2f2;
}
html.dark, body {
height: 100%;
background: var(--lay-color-bg-1);
}
.ws-header-theme .layui-form-switch {
vertical-align: baseline;
}
.ws-header-theme .layui-form-onswitch {
background: #333333;
border: 1px solid rgba(255, 255, 255, .7);
}
.layuimini-container {
min-height: 250px;
padding: 15px;
@@ -60,8 +58,10 @@ body {
}
.hr-line {
color: #fff;
height: 1px;
margin: 30px 0;
background-color: #fff;
border-top: 1px dashed #e7eaec;
}
@@ -84,6 +84,7 @@ body {
margin: 0;
border: 1px solid #e6e6e6;
padding: 10px 20px 5px 20px;
color: #6b6b6b;
}
/**数据表格-搜索表单样式*/
@@ -133,17 +134,10 @@ body {
color: #a29c9c;
}
.tableSearch-xmSelect xm-select {
.layui-form-item xm-select {
min-height: 30px !important;
line-height: 30px !important;
margin: 0 !important;
background-color: var(--lay-color-fill-2);
}
.elem-style-dark .tableSearch-xmSelect xm-select {
background-color: var(--lay-color-fill-2);
color: var(--lay-color-text-2);
border-color: var(--lay-color-border-1) !important;
}
/** 按钮背景色 */
@@ -271,6 +265,7 @@ table样式
.layuimini-container .layui-table-box .layui-table-header th {
font-weight: bold !important;
color: #565656 !important;
}
/**
@@ -345,7 +340,7 @@ table样式
弹出层样式
*/
.layui-layer-easy .layui-layer-title {
background: var(--lay-color-bg-5);
background: #2c3e50 !important;
color: #fff !important;
border-bottom: none;
}
@@ -368,6 +363,7 @@ table样式
.layui-layer-easy .layui-layer-btn {
text-align: center !important;
padding: 10px !important;
background: #ecf0f1;
overflow: hidden;
}
@@ -516,5 +512,4 @@ table样式
.wangEditor_div {
z-index: 99999;
border: 1px solid var(--w-e-textarea-slight-border-color);
}

View File

@@ -1,802 +0,0 @@
// 通常用于背景色
$black-color :rgb(2, 17, 20);
// 通常用于字体颜色
$main-color :rgb(126, 252, 246);
// 通常用于边框
$less-main-color:rgb(6, 216, 215);
$plus-main-color:rgb(0, 125, 124);
// 通常用于激活状态,通常跟背景色搭配
$cover-color :rgba(62, 251, 251, 0.05);
// 更强的激活状态,适合做选项操作时使用
$active-color :rgba(62, 251, 251, 0.5);
$red-color :rgb(255, 0, 0);
$yellow-color:rgb(255, 255, 153);
$green-color :rgb(0, 255, 0);
& {
background-color: $black-color;
color: $main-color;
}
.layuimini-main {
background-color: $black-color;
}
.layuimini-container {
background-color: $black-color;
}
.layuimini-container .layui-table-tool {
background-color: $black-color;
}
$box-shape: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 0);
.layui-btn {
&.layui-btn-lg {
padding-right: 25px;
}
clip-path : $box-shape;
padding-right : 10px;
position : relative;
background-color: transparent;
border : 1px solid;
color : rgb(126, 252, 246);
text-shadow : rgb(126, 252, 246) 0px 0px 1px;
background-color: rgb(126, 252, 246);
&::before {
content: '';
display: block;
position: absolute;
z-index: -1;
clip-path: $box-shape;
width: 100%;
height: 100%;
left: -0.5px;
top: -0.5px;
background-color: $black-color;
}
&:hover::after {
content: '';
display: block;
position: absolute;
z-index: -1;
clip-path: $box-shape;
width: 100%;
height: 100%;
left: -0.5px;
top: -0.5px;
background-color: rgba(126, 252, 246, 0.2);
}
&.layui-btn-disabled {
&::after {
// todo:实现按钮禁用样式
}
}
&.layui-btn-success {
text-shadow: rgb(0, 255, 0) 0px 0px 1px;
color: rgb(0, 255, 0);
background-color: rgba(0, 255, 0);
border: unset;
&:hover::after {
background-color: rgba(0, 255, 0, 0.2);
}
}
&.layui-btn-danger {
text-shadow: rgb(255, 0, 0) 0px 0px 1px;
color: rgb(255, 0, 0);
background-color: rgb(255, 0, 0);
border: unset;
&:hover::after {
background-color: rgba(255, 0, 0, 0.2);
}
}
&.layuimini-btn-primary {
text-shadow: rgb(255, 255, 153) 0px 0px 1px;
color: rgb(255, 255, 153);
background-color: rgb(255, 255, 153);
border: unset;
&:hover::after {
background-color: rgba(255, 255, 153, 0.2);
}
}
&.layui-btn-primary {
border: unset;
}
&.layui-btn-normal {
color: $black-color;
background-color: $main-color;
border: unset;
&::before {
background-color: $main-color;
}
&:hover::after {
background-color: $main-color;
}
}
}
.layui-table {
background: $black-color;
color: $main-color;
tr {
background-color: $cover-color;
}
td {
border-color: $less-main-color;
}
}
.layui-table-header {
background-color: $black-color;
}
.layuimini-container .layui-table-box {
border-color: $less-main-color;
}
.layuimini-container .layui-table-box .layui-table-header th {
color: $main-color !important;
}
.layui-table-tool .layui-inline[lay-event] {
color: $main-color;
border: none;
position: relative;
&::after {
border-color: $main-color;
border-width: 1px;
border-style: solid;
clip-path: $box-shape;
position: absolute;
left: 0;
top: 0;
width: calc(100% - 1px);
height: calc(100% - 1px);
content: '';
display: block;
}
}
.layui-table tbody tr:hover {
background-color: rgba(126, 252, 246, 0.1);
}
.layuimini-main {
border-color: $less-main-color;
}
.layui-table-header {
border-color: $less-main-color;
}
.color-content>ul>li>a>div>span:nth-child(2) {
background-color: $black-color !important;
}
.layuimini-color .elem-content li {
clip-path: $box-shape;
}
.layuimini-color .elem-content li.layui-this {
background-color: $main-color;
color: $black-color !important;
border-color: $less-main-color;
}
.layuimini-color .more-menu-item {
color: $main-color;
&:hover {
background-color: rgba(62, 251, 251, 0.05);
}
}
.layui-layout-admin .layui-header {
background-color: $cover-color !important;
}
.layuimini-tab .layui-tab-title {
background-color: $cover-color !important;
border-color: $less-main-color;
}
.layuimini-tab .layui-tab-title span {
color: $active-color;
}
.layui-header .layuimini-menu-header-pc.layui-nav .layui-nav-item a:hover,
.layui-header .layuimini-header-menu.layuimini-pc-show.layui-nav .layui-this a {
color: $black-color !important;
}
.layui-layout-admin .layui-header .layui-nav .layui-nav-item a {
color: $main-color !important;
}
.layui-layout-admin .layui-header .layui-nav .layui-nav-item {
background-color: $active-color;
}
.layui-layout-admin .layui-header .layuimini-header-content>ul>.layui-nav-item.layui-this,
.layuimini-tool i:hover {
background-color: $main-color !important;
}
.layuimini-tab .layui-tab-control>li {
background-color: $black-color;
border-color: $less-main-color;
}
.layuimini-tab .layui-tab-title li {
border-color: $less-main-color;
}
.layui-flow-more a *,
.layui-laypage input,
.layui-table-view select[lay-ignore] {
border-color: $less-main-color;
background-color: $black-color;
color: $main-color;
}
.layui-laypage button,
.layui-laypage input {
border-color: $less-main-color;
background-color: $black-color;
color: $main-color;
}
.layuimini-container .layui-form-switch {
border-color: $less-main-color !important;
background-color: $black-color !important;
}
.layuimini-container .layui-form-onswitch {
background-color: $main-color !important;
}
.layuimini-container .layui-form-switch.layui-form-onswitch i {
background-color: $black-color !important;
}
.layuimini-container .layui-laypage .layui-laypage-curr .layui-laypage-em {
background-color: $main-color !important;
}
.layui-laypage .layui-laypage-curr em {
color: $black-color !important;
}
.layuimini-tab .layui-tab-title .layui-this .layuimini-tab-active {
background-color: $less-main-color;
}
.layui-table-view .layui-form-checkbox.layui-form-checked[lay-skin="primary"] i {
border-color: $main-color;
background-color: $main-color;
color: $black-color;
}
.layui-table-view .layui-form-checkbox[lay-skin="primary"] i {
background-color: $cover-color;
}
.layui-table-init {
background-color: $black-color;
}
.box-border-line {
position: relative;
border: 1px solid $less-main-color;
border-width: 1px;
$border-offset: 3px;
&::before {
content: '';
position: absolute;
width: 50px;
height: 20px;
transition: all 0.2s;
border: 1px solid $less-main-color;
top: -$border-offset;
left: -$border-offset;
border-right: none;
border-bottom: none;
pointer-events: none;
}
&::after {
content: "";
position: absolute;
width: 50px;
height: 20px;
transition: all 0.2s;
border: 1px solid $less-main-color;
bottom: -$border-offset;
right: -$border-offset;
border-left: none;
border-top: none;
pointer-events: none;
}
&:hover {
&::after,
&::before {
width: calc(100% + $border-offset);
height: calc(100% + $border-offset);
}
}
}
.table-search-fieldset {
.layui-input-inline {
margin-right: 0;
}
.layui-form-item:not(:last-child) {
margin-right: 10px;
@extend .box-border-line;
}
.layui-form-label {
border: unset;
}
}
.layui-form-pane .layui-form-label {
background-color: $cover-color;
color: $main-color;
}
.layuimini-container .table-search-fieldset {
color: $main-color;
border-color: $less-main-color;
}
.layui-form-select,
.layui-form-autocomplete {
dl {
color: $main-color;
background-color: $black-color;
border-color: $less-main-color;
dd {
&.layui-this {
background-color: $main-color !important;
color: $black-color;
}
&:hover {
background-color: $less-main-color !important;
color: $black-color;
}
}
}
}
.layui-iconpicker-item,
.layui-iconpicker-item:hover {
border-color: $less-main-color !important;
color: $black-color;
.layui-iconpicker-icon:hover {
border-color: $less-main-color !important;
}
}
.layui-nav-child {
background-color: $black-color;
color: $main-color;
}
.layui-layout-admin .layui-header .layui-nav .layui-nav-item .layui-nav-child a {
color: $main-color !important;
}
.layui-badge,
.layui-badge-dot,
.layui-badge-rim {
background-color: $main-color;
}
.layui-nav .layui-nav-child a:hover {
background-color: $active-color;
}
.layui-table-tool-panel {
background-color: $black-color;
}
.layui-form-checkbox[lay-skin="primary"] span {
color: $main-color;
}
.layui-table-tool-panel li:hover {
background-color: $active-color;
}
.layui-side.layui-bg-black,
.layui-side.layui-bg-black>.layuimini-menu-left>ul,
.layuimini-menu-left-zoom>ul {
background-color: $black-color !important;
}
.layui-side {
border-right: 1px solid $main-color;
}
.layui-bg-blue {
background-color: #0000ff !important;
}
.layui-bg-orange {
background-color: $yellow-color !important;
color: $black-color !important;
}
.layui-bg-green {
background-color: $green-color !important;
color: $black-color !important;
}
.layui-table-hover {
background-color: $cover-color;
}
.layui-table-grid-down {
background-color: $black-color;
color: $main-color;
border-color: unset;
}
.layui-table-tips-main {
background-color: $main-color;
color: $black-color;
}
.layui-layout-admin .layui-header .layuimini-tool i {
color: $main-color;
}
.color-red {
color: $red-color !important;
}
.layuimini-tab .layui-tab-title .layui-this span {
color: $main-color;
}
.layui-card {
background-color: $cover-color;
border-radius: 0;
@extend .box-border-line;
.layui-card-header {
color: $main-color;
}
}
.layui-text {
color: $main-color;
}
.layuimini-qiuck-module {
cursor: pointer;
a i {
background-color: $cover-color;
color: $active-color;
}
a cite {
color: $active-color;
}
&:hover {
a i {
background-color: $active-color;
color: $main-color;
}
a cite {
color: $main-color;
}
}
}
.layui-bg-number {
background-color: $cover-color;
}
.layui-input,
.layui-select,
.layui-textarea,
.city-picker-span,
.main-input {
background-color: $cover-color;
color: $main-color;
}
.city-picker-span>.title>span {
color: $main-color;
&:hover {
background-color: $main-color;
color: $black-color;
}
}
.layui-form-radio:hover *,
.layui-form-radioed,
.layui-form-radioed>i {
color: $main-color;
}
.layui-form-checked[lay-skin="primary"] i {
border-color: $main-color !important;
background-color: $main-color;
color: $black-color;
}
.layui-input:focus,
.layui-textarea:focus {
border-color: $main-color !important;
}
.layui-input:hover,
.layui-textarea:hover {
border-color: $main-color !important;
}
.layui-badge-rim,
.layui-border,
.layui-colla-content,
.layui-colla-item,
.layui-collapse,
.layui-elem-field,
.layui-form-pane .layui-form-item[pane],
.layui-form-pane .layui-form-label,
.layui-input,
.layui-layedit,
.layui-layedit-tool,
.layui-panel,
.layui-quote-nm,
.layui-select,
.layui-tab-bar,
.layui-tab-card,
.layui-tab-title,
.layui-tab-title .layui-this::after,
.layui-textarea {
border-color: $main-color !important;
}
.form-search .layui-input-inline input,
.form-search .layui-input-inline select {
border-width: 0 0 0 1px;
}
.layuimini-tab .layui-tab-tool .layui-nav-child {
border-color: $main-color;
}
.layui-nav .layui-nav-child a {
color: $main-color;
}
.layui-form-item {
margin-bottom: 12px;
}
.layuimini-upload .layuimini-upload-btn {
background-color: $black-color;
}
.layui-layer {
border: 1px solid $main-color;
background-color: $black-color;
}
.layui-layer-easy .layui-layer-title {
background-color: $plus-main-color !important;
color: $main-color !important;
}
.layui-table td,
.layui-table th,
.layui-table-col-set,
.layui-table-fixed-r,
.layui-table-grid-down,
.layui-table-header,
.layui-table-page,
.layui-table-tips-main,
.layui-table-tool,
.layui-table-total,
.layui-table-view,
.layui-table[lay-skin="line"],
.layui-table[lay-skin="row"] {
border-color: $less-main-color;
}
.layui-table tbody tr:hover,
.layui-table thead tr,
.layui-table-click,
.layui-table-header,
.layui-table-hover,
.layui-table-mend,
.layui-table-patch,
.layui-table-tool,
.layui-table-total,
.layui-table-total tr {
background-color: $black-color;
}
.hr-line {
color: $main-color;
border-color: $less-main-color;
background-color: $main-color;
}
.layui-layer-easy .layui-layer-btn {
background-color: $black-color;
border-top: 1px solid $less-main-color;
}
.layui-layer-easy .layui-layer-btn .layui-layer-btn0 {
background-color: $main-color;
border-color: $less-main-color;
color: $main-color !important;
clip-path: $box-shape;
}
.layui-layer-easy .layui-layer-btn a {
@extend .layui-btn
}
.layui-layer-shade {
background-color: #fff !important;
}
.layuimini-menu-left {
.layui-nav-tree .layui-nav-item {
margin: 5px;
width: calc(100% - 10px);
}
.layui-nav .layui-nav-item {
clip-path: $box-shape;
color: $main-color;
background-color: $active-color;
&.layui-this a {
background-color: $main-color !important;
color: $black-color !important;
}
&.layui-this {
background-color: $main-color !important;
color: $black-color !important;
span {
background-color: $main-color !important;
color: $black-color !important;
}
}
}
.layui-nav .layui-nav-item a:hover {
background-color: $active-color !important;
}
}
.layuimini-menu-left .layui-nav .layui-nav-item a,
.layuimini-menu-left-zoom.layui-nav .layui-nav-item a {
color: $main-color !important;
}
.layuimini-menu-left .layui-nav-item a span {
color: $main-color !important;
}
.layuimini-menu-left .layui-nav-item:hover a span {
color: $black-color !important;
}
.layui-layout-admin .layuimini-logo {
background-color: $black-color !important;
}
.layuimini-menu-left .layui-nav-itemed>.layui-nav-child {
background-color: $black-color !important;
}
.layuimini-menu-left .layui-nav-tree .layui-this,
.layuimini-menu-left .layui-nav-tree .layui-this>a,
.layuimini-menu-left .layui-nav-tree .layui-nav-child dd.layui-this,
.layuimini-menu-left .layui-nav-tree .layui-nav-child dd.layui-this a,
.layuimini-menu-left-zoom.layui-nav-tree .layui-this,
.layuimini-menu-left-zoom.layui-nav-tree .layui-this>a,
.layuimini-menu-left-zoom.layui-nav-tree .layui-nav-child dd.layui-this,
.layuimini-menu-left-zoom.layui-nav-tree .layui-nav-child dd.layui-this a {
background-color: $main-color !important;
color: $black-color !important;
.layui-left-nav {
color: $black-color !important;
}
}
.layui-iconpicker-icon {
border-color: $less-main-color !important;
background-color: $less-main-color !important;
}
.layui-iconpicker .layui-anim {
background-color: $black-color;
}
.layui-iconpicker .layui-iconpicker-list {
background-color: $black-color;
}
.layui-header .layui-nav .layui-nav-child dd.layui-this a,
.layui-header .layui-nav-child dd.layui-this,
.layui-layout-admin .layui-header .layui-nav .layui-nav-item .layui-nav-child .layui-this a {
background-color: $active-color !important;
}

View File

@@ -1,81 +0,0 @@
.layui-btn {
color : #808185 !important;
background-color: #cde7ff !important;
border : 1px solid #d3dde6 !important;
}
.layui-layer-easy .layui-layer-title {
background-color: rgb(215, 215, 215) !important;
color : #6C6E71 !important;
}
.layui-layer-easy .layui-layer-setwin>a::after {
color: #6C6E71 !important;
}
.layui-layer-easy .layui-layer-btn .layui-layer-btn0 {
color : #808185 !important;
background-color: #cde7ff !important;
border : 1px solid #d3dde6 !important;
}
.layuimini-tab .layui-tab-title .layuimini-tab-active {
display: none !important;
}
.layuimini-tab .layui-tab-title li {
padding : 0 5px !important;
font-size : 12px;
border-width: 1px 1px 1px 0 !important;
border-style: solid !important;
}
.layuimini-tab .layui-tab-title li.layui-this {
color : #fff !important;
border-color: rgba(0, 0, 255, 1) !important;
background : rgba(90, 173, 255, 1) !important;
}
.layuimini-tab .layui-tab-title .layui-this span {
color: #fff !important;
}
.layuimini-tab>.layui-tab-title li,
.layuimini-tab>.close-box li {
line-height: 27px !important;
}
.layuimini-tab>.layui-tab-title,
.layuimini-tab>.close-box {
height: 28px !important;
}
.layuimini-tab .layui-tab-control>li {
height : 28px !important;
line-height: 28px !important;
}
.layuimini-container .layui-laypage .layui-laypage-curr .layui-laypage-em {
background-color: #6C6E71 !important;
}
.layuimini-container .layui-form-onswitch {
background-color: #cde7ff !important;
border-color : #cde7ff !important;
}
.layuimini-container .layui-form-switch {
background-color: #6C6E71;
border-color : #6C6E71;
}
.layui-table-tool .layui-inline[lay-event] {
border-color: transparent;
}
.layui-form-checked[lay-skin="primary"] i {
border-color : #cde7ff !important;
background-color: #cde7ff !important;
}

View File

@@ -1,708 +0,0 @@
& {
background-color: #f6f5f4;
color : #2e3436;
}
.layuimini-container {}
.layuimini-main {
padding: 0;
}
.layuimini-container .layui-table-box .layui-table-header th {
color : #979a9b !important;
font-weight : 700 !important;
font-weight : bold;
text-shadow : none;
border-color : #d7d2ce;
border-bottom: 1px solid;
&:not(:last-child) {
border-right: 1px solid #d7d2ce;
}
}
.layui-table-view .layui-table td {
border-bottom: unset;
&:not(:last-child) {
border-right: 1px solid #d7d2ce;
}
}
.layui-table {
color : #2e3436;
background: #f6f5f4;
}
.layui-table-view .layui-table[lay-size="sm"] .layui-table-cell {
line-height: 30px;
}
.layui-table tbody tr:hover,
.layui-table thead tr,
.layui-table-click,
.layui-table-header,
.layui-table-hover,
.layui-table-mend,
.layui-table-patch,
.layui-table-tool,
.layui-table-total,
.layui-table-total tr {
background-color: unset;
}
.layui-table-cell {
padding: 0 4px;
}
.layui-table img {
height: 25px !important;
width : auto !important;
}
.layui-btn {
position : relative;
outline : none;
overflow : visible;
line-height : 28px;
border-radius : 5px;
transition : all .15s cubic-bezier(.25, .46, .45, .94);
padding : 4px 9px;
user-select : none;
color : #2e3436;
outline-color : rgba(53, 132, 228, .5);
border : 1px solid #cdc7c2;
border-bottom-color: rgb(205, 199, 194);
border-bottom-color: #bfb8b1;
background-color : #f6f5f4;
box-shadow : inset 0 1px #fff, 0 1px 2px rgba(0, 0, 0, .07);
&::before {
content : ' ';
position : absolute;
pointer-events: none;
width : 100%;
height : 100%;
top : 0px;
left : 0px;
background : linear-gradient(to top, rgba(0, 0, 0, 0.03), transparent);
transition : all 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
&::after {
content : '';
position : absolute;
pointer-events: none;
z-index : 2;
display : inline-block;
border : 2px solid transparent;
border-radius : inherit;
transition : all 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
top : -4px;
left : -4px;
width : calc(100% - -4px);
height : calc(100% - -4px);
}
&.layui-btn-normal {
color : #fff;
border-color : #1b6acb #1b6acb #15539e;
background-color: #3c88e5;
box-shadow : inset 0 1px #3181e3, 0 1px 2px rgba(0, 0, 0, .07);
}
&.layui-btn-danger {
color : #fff;
border-color : #b2161d #b2161d #851015;
background-color: #e41f28;
box-shadow : inset 0 1px #db1a23, 0 1px 2px rgba(0, 0, 0, .07);
}
&.layui-btn-sm {
line-height: 20px;
}
&.layui-btn-xs {
line-height: 12px
}
}
.layuimini-container .layui-table-tool .layui-inline[lay-event] {
@extend .layui-btn;
line-height : 32px;
min-width : 32px;
min-height : 32px;
padding : 0;
border-radius: 9999px;
}
.layui-laydate .layui-this {
background-color: #3584e4 !important;
}
.layui-laydate-content td,
.layui-laydate-content th {
width : 36px;
height : 36px;
border-radius: 100%;
}
.laydate-footer-btns span {
@extend .layui-btn;
line-height: 16px;
&:not(:last-child) {
border-right-style : none;
border-top-right-radius : 0;
border-bottom-right-radius: 0;
}
&:not(:first-child) {
border-top-left-radius : 0;
border-bottom-left-radius: 0;
}
}
.layui-laydate-footer span {
@extend .layui-btn;
line-height: 16px;
}
.layui-laydate-footer span.layui-laydate-preview {
line-height: 22px;
}
.layui-form-checked[lay-skin="primary"] i {
border-color : #185fb4 !important;
background-color: #5094e8;
background-image: linear-gradient(0deg, #3987e5, #5094e8);
}
.layui-form-checkbox[lay-skin="primary"]:hover i {
border-color : #185fb4;
background-image: linear-gradient(0deg, #5094e8, #6ba5eb);
}
.layui-table-view .layui-form-checkbox[lay-skin="primary"] i {
border-radius: 3px;
}
.layui-table-view .layui-form-checkbox i {
font-weight: bold;
}
.layui-layer-title {
padding : 0 6px;
min-height : 46px;
border : 1px solid #bfb8b1;
border-top-left-radius : 8px;
border-top-right-radius: 8px;
background : #f1f0ee linear-gradient(0deg, #dfdcd8, #f4f2f1) !important;
color : #2e3436 !important;
padding-left : 12px;
padding-right : 12px;
font-weight : bold;
}
.layui-layer {
background-color: #f6f5f4;
}
.layui-layer-easy .layui-layer-title~.layui-layer-setwin>a {
position : relative;
outline : none;
overflow : visible;
border-radius: 5px;
transition : all .15s cubic-bezier(.25, .46, .45, .94);
user-select : none;
outline-color : rgba(53, 132, 228, .5);
border : 1px solid #cdc7c2;
border-bottom-color: rgb(205, 199, 194);
border-bottom-color: #bfb8b1;
background-color : #f6f5f4;
box-shadow : inset 0 1px #fff, 0 1px 2px rgba(0, 0, 0, .07);
height : 20px;
line-height : 20px;
width : 20px;
text-align : center;
display : inline-flex;
align-items : center;
justify-content : center;
&::after {
color: #2e3436 !important;
}
}
.layui-layer-setwin {
display : flex;
align-items: center;
}
.layuimini-container .layui-form-switch.layui-form-onswitch {
color : #ffffff;
border-color : #185fb4;
background-color: #3584e4;
text-shadow : 0 1px rgba(53, 132, 228, 0.5), 0 0 2px rgba(255, 255, 255, 0.6);
}
.layuimini-container .layui-form-switch {
border : 1px solid #cdc7c2;
border-radius : 20px;
color : rgba(46, 52, 54, 0.2);
background-color: #e1dedb;
text-shadow : 0 1px rgba(0, 0, 0, 0.1);
transition : all 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.layui-form-switch {
height: 20px;
width : 40px;
}
.layui-form-switch {
padding : 0;
line-height: 20px;
}
.layui-form-switch.layui-form-onswitch i {
top : 0;
height : 20px;
width : 20px;
margin-left: -20px;
}
.layui-form-switch i {
top : 0;
height : 20px;
width : 20px;
margin-left : -5px;
border-radius : 50%;
transition : all 150ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
color : #2e3436;
outline-color : rgba(53, 132, 228, 0.5);
border-color : #cdc7c2;
border-bottom-color: #bfb8b1;
background-color : #f6f5f4;
box-shadow : inset 0 1px white, 0 1px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.07);
}
.layuimini-main {
background-color: unset;
}
.layui-tab-title li {
transition : none;
padding : 3px 12px;
min-height : 30px;
min-width : 65px;
display : flex;
justify-content : center;
align-items : center;
white-space : nowrap;
color : #2e3436;
font-weight : normal;
user-select : none;
border : 0;
border-top-style : none;
border-right-style : none;
border-bottom-style: none;
border-left-style : none;
&:hover {
box-shadow : inset 0 -3px #c8c2bc;
background-color: #edebe9;
}
&.layui-this {
box-shadow : inset 0 -3px #3584e4;
background-color: #f1f0ee;
}
}
.layui-tab-title {
display : flex;
align-items : center;
flex-direction: row;
padding-left : 4px;
padding-right : 4px;
}
.layuimini-tab>.layui-tab-title li,
.layuimini-tab>.close-box li {
line-height: 20px !important;
}
.layuimini-tab .layui-tab-title .layui-this .layuimini-tab-active {
display: none;
}
.layuimini-tab .layui-tab-title .layui-this span {
color: #2e3436 !important
}
.layuimini-tab .layui-tab-title span {
color: #2e3436 !important
}
.layuimini-tab .layui-tab-title .layuimini-tab-active {
display: none;
}
.layuimini-tab .layui-tab-title {
background-color: #e1dedb;
border-color : #cdc7c2;
}
.layui-layer-easy .layui-layer-btn {
background-color: #f2f2f2;
}
.layui-layer-dialog .layui-layer-content {
background-color: #f2f2f2;
}
.layui-layer-easy .layui-layer-btn a {
position : relative;
outline : none;
overflow : visible;
line-height : 22px;
height : 22px;
border-radius : 5px;
transition : all .15s cubic-bezier(.25, .46, .45, .94);
padding : 4px 9px;
user-select : none;
color : #2e3436 !important;
outline-color : rgba(53, 132, 228, .5);
border : 1px solid #cdc7c2;
border-bottom-color: rgb(205, 199, 194);
border-bottom-color: #bfb8b1;
background-color : #f6f5f4;
box-shadow : inset 0 1px #fff, 0 1px 2px rgba(0, 0, 0, .07);
&::before {
content : ' ';
position : absolute;
pointer-events: none;
width : 100%;
height : 100%;
top : 0px;
left : 0px;
background : linear-gradient(to top, rgba(0, 0, 0, 0.03), transparent);
transition : all 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
&::after {
content : '';
position : absolute;
pointer-events: none;
z-index : 2;
display : inline-block;
border : 2px solid transparent;
border-radius : inherit;
transition : all 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
top : -4px;
left : -4px;
width : calc(100% - -4px);
height : calc(100% - -4px);
}
&.layui-layer-btn0 {
color : #fff !important;
border-color : #1b6acb #1b6acb #15539e;
background-color: #3c88e5;
box-shadow : inset 0 1px #3181e3, 0 1px 2px rgba(0, 0, 0, .07);
}
}
.layui-tab-brief {
&>.layui-tab-title {
li {
@extend .layui-btn;
&:not(:last-child) {
border-right-style : none;
border-top-right-radius : 0;
border-bottom-right-radius: 0;
}
&:not(:first-child) {
border-top-left-radius : 0;
border-bottom-left-radius: 0;
}
&.layui-this {
color : unset;
color : #2e3436;
border-color : #cdc7c2;
background-color: #d6d1cd;
box-shadow : inset 0 1px rgba(255, 255, 255, 0);
&::after {
display: none;
}
}
&:hover {
box-shadow : unset;
background-color: #edebe9;
}
}
}
}
.layui-form-radio:hover *,
.layui-form-radioed,
.layui-form-radioed>i {
color: #5094e8;
}
.layui-card {
.layui-card-header {
padding : 0 6px;
min-height : 46px;
border-width : 1px;
border-style : solid;
border-color : #bfb8b1;
border-top-left-radius : 8px;
border-top-right-radius: 8px;
background : #f1f0ee linear-gradient(to top, #dfdcd8, #f4f2f1);
box-shadow : inset 0 1px rgba(255, 255, 255, 0.8), inset 0 -2px 2px rgba(0, 0, 0, 0.02);
.icon {
color: #979a9b !important;
}
}
.layui-card-body {
background-color: #f6f5f4;
border : 1px solid #cdc7c2;
}
}
.layui-btn,
.layui-input,
.layui-select,
.layui-textarea,
.layui-upload-button,
.city-picker-span {
border-radius: 5px;
border : 1px solid #cdc7c2;
}
.layui-side.layui-bg-black,
.layui-side.layui-bg-black>.layuimini-menu-left>ul,
.layuimini-menu-left-zoom>ul {
background-color: #f6f5f4 !important;
}
.layuimini-menu-left {
background-color: #fbfafa;
border-right : 1px solid #cdc7c2;
.layui-nav {
li {
&:not(:first-child) {
border-top: 1px solid #cdc7c2;
}
&.layui-this {
a {
background-color: #347cd3 !important;
color : #fff !important;
}
}
}
}
}
.layuimini-menu-left .layui-nav .layui-this a,
.layuimini-menu-left-zoom.layui-nav .layui-this a {
color: #2e3436 !important;
}
.layuimini-menu-left .layui-nav .layui-nav-item.layui-this a:hover,
.layuimini-menu-left-zoom.layui-nav .layui-nav-item.layui-this a:hover {
color: #fff !important;
}
.layuimini-menu-left .layui-nav .layui-nav-item a,
.layuimini-menu-left-zoom.layui-nav .layui-nav-item a {
color: #2e3436 !important;
&:hover {
color: #2e3436 !important;
}
}
.layuimini-menu-left .layui-nav .layui-nav-item a {
height : 30px;
line-height: 30px;
}
.layuimini-menu-left .layui-nav-itemed>.layui-nav-child {
background-color: rgba(46, 52, 54, 0.05) !important;
border-top : 1px solid #d7d2ce;
dd {
border-bottom: 1px solid #d7d2ce;
}
}
.layuimini-menu-left .layui-nav-tree .layui-this,
.layuimini-menu-left .layui-nav-tree .layui-this>a,
.layuimini-menu-left .layui-nav-tree .layui-nav-child dd.layui-this,
.layuimini-menu-left .layui-nav-tree .layui-nav-child dd.layui-this a,
.layuimini-menu-left-zoom.layui-nav-tree .layui-this,
.layuimini-menu-left-zoom.layui-nav-tree .layui-this>a,
.layuimini-menu-left-zoom.layui-nav-tree .layui-nav-child dd.layui-this,
.layuimini-menu-left-zoom.layui-nav-tree .layui-nav-child dd.layui-this a {
background-color: #347cd3 !important;
color : #fff !important;
}
.layui-layout-admin .layuimini-logo {
background-color: unset !important;
}
.layuimini-header-menu>li.layui-nav-item {
@extend .layui-btn;
margin-top : 10px;
height : 30px !important;
line-height: 30px !important;
&::after {
background-color: transparent;
}
&:not(:last-child) {
border-right-style : none;
border-top-right-radius : 0;
border-bottom-right-radius: 0;
}
&:not(:first-child) {
border-top-left-radius : 0;
border-bottom-left-radius: 0;
}
&:nth-last-child(2) {
border-right-style : solid;
border-radius : 5px;
border-top-left-radius : 0;
border-bottom-left-radius: 0;
}
}
.layui-layout-admin .layui-header {
background-color: #f6f5f4 !important;
}
.layui-layer-dialog {
border-radius: 20px;
}
.layui-layer-iframe {
border-radius: 20px;
}
.layuimini-tab .layui-tab-control>li {
background-color: #e1dedb;
border-style : solid;
border-color : #cdc7c2;
}
.form-search .layui-btn {
height : 32px;
line-height: 22px;
}
.form-search .layui-form-select dl {
transition : all 80ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
background-color : #ffffff;
background-clip : padding-box;
border : 1px solid rgba(0, 0, 0, 0.23);
border-top-left-radius : 0;
border-top-right-radius: 0;
border-radius : 9px;
border-top-left-radius : 0px;
border-top-right-radius: 0px;
box-shadow : 0 1px 3px 2px rgba(0, 0, 0, 0.08);
top : 28px;
}
.layui-form-select dl dd,
.layui-form-select dl dt {
height : 30px;
line-height: 30px;
padding : 0 10px;
}
.layuimini-container .layui-form-select dl dd.layui-this {
background-color: #3c88e5 !important;
}
.layui-table-header .layui-table {
margin-bottom: 0;
}
.layui-header .layui-nav .layui-nav-child dd.layui-this a,
.layui-header .layui-nav-child dd.layui-this,
.layui-layout-admin .layui-header .layui-nav .layui-nav-item .layui-nav-child .layui-this a {
background-color: #3c88e5 !important;
}
.layuimini-mobile-show {
.layui-nav-more {
top: 4px;
}
}
.layui-layer-easy .layui-layer-setwin>span {
color: #2e3436;
}
.layui-layer-easy .layui-layer-setwin>span:after {
color: #2e3436;
}
.layui-layer-easy .layui-layer-setwin .layui-layer-max::after,
.layui-layer-easy .layui-layer-setwin .layui-layer-max::before {
border-color: #2e3436;
}
.layui-layer-easy .layui-layer-setwin .layui-layer-min::before {
background-color: #2e3436;
}

View File

@@ -1,284 +0,0 @@
$main-color:#61677C;
& {
background-color: #EBECF0;
}
.layui-layout-admin .layui-header {
background-color: #EBECF0 !important;
}
.layuimini-container .layui-btn-success {
color: #4bb368;
}
.layuimini-container .layui-btn-danger {
color: #f56c6c;
}
.layuimini-container .layuimini-btn-primary {
color: #2c3e50;
}
.layuimini-container .layui-btn-primary {
color: #5f5f5f;
}
.layuimini-container .layui-btn-normal {
color: #1e9fff;
}
.layui-btn {
border: 0;
outline: 0;
border-radius: 10px;
background-color: #EBECF0;
text-shadow: 1px 1px 0 #FFF;
color: $main-color;
box-shadow: -5px -5px 20px #FFF, 5px 5px 20px #BABECC;
transition: all 0.2s ease-in-out;
cursor: pointer;
font-weight: 600;
&:hover {
box-shadow: -2px -2px 5px #FFF, 2px 2px 5px #BABECC;
}
}
.layui-table-tool .layui-inline[lay-event] {
@extend .layui-btn;
}
.layuimini-main {
@extend .layui-btn;
text-shadow: 0.5px 0.5px 0 #fff;
}
.layui-layer {
@extend .layui-btn;
}
.layui-layer-easy .layui-layer-title {
background-color: transparent !important;
color: $main-color !important;
}
.layui-layer-easy .layui-layer-setwin>span {
color: $main-color !important;
&::before {
border-color: $main-color !important;
}
&::after {
border-color: $main-color !important;
}
}
.layui-layer-easy .layui-layer-setwin .layui-layer-min::before {
background-color: $main-color !important;
}
.layui-card {
@extend .layui-btn;
text-shadow: 0.5px 0.5px 0 #fff;
}
.layuimini-container .layui-table-tool {
background-color: transparent;
}
.layui-table {
background-color: #EBECF0;
}
.panel {
@extend .layui-btn;
text-shadow: 0.5px 0.5px 0 #fff;
}
.layuimini-qiuck-module {
@extend .layui-btn;
i {
background-color: transparent
}
}
.layui-side.layui-bg-black,
.layui-side.layui-bg-black>.layuimini-menu-left>ul,
.layuimini-menu-left-zoom>ul {
@extend .layui-btn;
background-color: #EBECF0 !important;
border-radius: 0;
}
.layuimini-menu-left .layui-nav .layui-nav-item a,
.layuimini-menu-left-zoom.layui-nav .layui-nav-item a {
@extend .layui-btn;
&:hover {
box-shadow: -2px -2px 5px #FFF, 2px 2px 5px #BABECC;
}
}
.layui-nav-tree .layui-nav-item {
margin: 10px;
width: calc(100% - 20px);
}
.layuimini-menu-left .layui-nav-itemed>.layui-nav-child {
background-color: transparent !important;
}
.layui-nav-tree .layui-nav-child dd {
margin: 10px;
width: calc(100% - 20px);
}
.layuimini-menu-left .layui-nav-tree .layui-this,
.layuimini-menu-left .layui-nav-tree .layui-this>a,
.layuimini-menu-left .layui-nav-tree .layui-nav-child dd.layui-this,
.layuimini-menu-left .layui-nav-tree .layui-nav-child dd.layui-this a,
.layuimini-menu-left-zoom.layui-nav-tree .layui-this,
.layuimini-menu-left-zoom.layui-nav-tree .layui-this>a,
.layuimini-menu-left-zoom.layui-nav-tree .layui-nav-child dd.layui-this,
.layuimini-menu-left-zoom.layui-nav-tree .layui-nav-child dd.layui-this a {
background-color: inherit !important;
}
.layuimini-menu-left .layui-nav .layui-nav-item a:hover,
.layuimini-menu-left .layui-nav .layui-this a,
.layuimini-menu-left-zoom.layui-nav .layui-nav-item a:hover,
.layuimini-menu-left-zoom.layui-nav .layui-this a {
color: $main-color !important;
}
.layui-layout-admin .layuimini-logo {
background-color: transparent !important;
}
.layui-header {
.layuimini-header-menu>.layui-nav-item {
@extend .layui-btn;
margin: 10px;
line-height: 40px !important;
height: 40px !important;
}
.layui-nav .layui-nav-item {
@extend .layui-btn;
margin: 10px;
line-height: 40px !important;
height: 40px !important;
}
}
.layui-btn-xs {
padding: 0 9px;
}
.layui-input,
.layui-textarea {
border: 0;
outline: 0;
font-size: 16px;
border-radius: 320px;
padding: 16px;
background-color: #EBECF0;
text-shadow: 1px 1px 0 #FFF;
margin-right: 8px;
box-shadow: inset 2px 2px 5px #BABECC, inset -5px -5px 10px #FFF;
width: 100%;
box-sizing: border-box;
transition: all 0.2s ease-in-out;
appearance: none;
-webkit-appearance: none;
}
.layuimini-upload .layuimini-upload-btn {
background-color: transparent !important;
}
.layui-form-pane .layui-form-label {
background-color: transparent;
text-align: right;
}
.layuimini-container .layui-form-select dl dd.layui-this {
background-color: transparent !important;
color: #2c3e50
}
.layuimini-color .elem-content li.layui-this {
text-shadow: 0.5px 0.5px 0 #FFF;
}
.layui-form-select dl {
@extend .layui-btn;
}
.layui-form-checkbox {
@extend .layui-btn;
padding: 10px 10px 10px 24px;
}
.layui-form-checkbox>i {
left: 6px;
top: 10px;
text-shadow: 0.5px 0.5px 0 #fff;
}
.layui-form-checked:hover>div,
.layui-form-checked>div {
color: #16b777;
}
.layui-tree,
.laytable-cell-checkbox {
.layui-form-checkbox[lay-skin="primary"] {
padding: 13px;
}
.layui-form-checkbox[lay-skin="primary"]>i {
left: 5px;
top: 5px
}
}
.layui-tree-txt {
margin-left: 10px
}
.layui-form-radio {
@extend .layui-btn;
}
.layui-form-radio:hover>*,
.layui-form-radioed,
.layui-form-radioed>i {
color: #16b777;
}
.layui-table-tips-c {
text-shadow: 0.5px 0.5px 0 #fff;
}
.layuimini-tab .layui-tab-title {
background-color: #EBECF0;
}
.layuimini-tab .layui-tab-control>li {
background-color: #EBECF0;
}

View File

@@ -1,344 +0,0 @@
a,
button {
cursor: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAzElEQVRYR+2X0Q6AIAhF5f8/2jYXZkwEjNSVvVUjDpcrGgT7FUkI2D9xRfQETwNIiWO85wfINfQUEyxBG2ArsLwC0jioGt5zFcwF4OYDPi/mBYKm4t0U8ATgRm3ThFoAqkhNgWkA0jJLvaOVSs7j3qMnSgXWBMiWPXe94QqMBMBc1VZIvaTu5u5pQewq0EqNZvIEMCmxAawK0DNkay9QmfFNAJUXfgGgUkLaE7j/h8fnASkxHTz0DGIBMCnBeeM7AArpUd3mz2x3C7wADglA8BcWMZhZAAAAAElFTkSuQmCC) 14 0, pointer
}
& {
cursor: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAABFklEQVRYR9WXURLDIAhE6/0PbSdOtUpcd1Gnpv1KGpTHBpCE1/cXq+vrMph7dGvXZTtpfW10DCA5jrH1H0Jhs5E0hnZdCR+vb5S8Nn8mQCeS9BdSalYJqMBjAGzq59xAESN7VFVUgV8AZB/dZBR7QTFDCqGquvUBVVoEtgIwpQRzmANSFHgWQKExHdIrPeuMvQNDarXe6nC/AutgV3JW+6bgqQLeV8FekRtgV+ToDKEKnACYKsfZjjkam7a0ZpYTytwmgainpC3HvwBocgKOxqRjehoR9DFKNFYtOwCGYCszobeCbl26N6yyQ6g8X/Wex/rBPsNEV6qAMaJPMynIHQCoSqS9JSMmwef51LflTgCRszU7DvAGiV6mHWfsaVUAAAAASUVORK5CYII=), auto;
font-family: "ark-pixel";
}
$border-line-width:3px;
.public-border {
border-style: solid;
border-width: $border-line-width;
border-image-slice: 2;
border-image-width: 2;
border-image-repeat: stretch;
border-image-source: url('data:image/svg+xml;utf8,<?xml version="1.0" encoding="UTF-8" ?><svg version="1.1" width="5" height="5" xmlns="http://www.w3.org/2000/svg"><path d="M2 1 h1 v1 h-1 z M1 2 h1 v1 h-1 z M3 2 h1 v1 h-1 z M2 3 h1 v1 h-1 z" fill="rgb(33,37,41)" /></svg>');
border-image-outset: 2;
}
.layui-btn {
@extend .public-border;
line-height: 32px;
position: relative;
display: inline-block;
text-align: center;
vertical-align: middle;
cursor: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAzElEQVRYR+2X0Q6AIAhF5f8/2jYXZkwEjNSVvVUjDpcrGgT7FUkI2D9xRfQETwNIiWO85wfINfQUEyxBG2ArsLwC0jioGt5zFcwF4OYDPi/mBYKm4t0U8ATgRm3ThFoAqkhNgWkA0jJLvaOVSs7j3qMnSgXWBMiWPXe94QqMBMBc1VZIvaTu5u5pQewq0EqNZvIEMCmxAawK0DNkay9QmfFNAJUXfgGgUkLaE7j/h8fnASkxHTz0DGIBMCnBeeM7AArpUd3mz2x3C7wADglA8BcWMZhZAAAAAElFTkSuQmCC) 14 0, pointer;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
color: #212529;
background-color: #fff;
border-image-repeat: stretch;
&::after {
position: absolute;
top: -$border-line-width;
right: -$border-line-width;
bottom: -$border-line-width;
left: -$border-line-width;
content: "";
box-shadow: inset (-$border-line-width) (-$border-line-width) #adafbc;
}
&:hover {
color: #212529;
text-decoration: none;
background-color: #e7e7e7;
}
&.layui-btn-sm {
line-height: 100%;
}
&.layui-btn-xs {
line-height: 16px;
}
&.layui-btn-normal {
color: #fff;
background-color: #209cee;
&::after {
box-shadow: inset (-$border-line-width) (-$border-line-width) #006bb3;
}
&:hover {
background-color: #108de0;
}
}
&.layui-btn-success {
color: #fff;
background-color: #92cc41;
&::after {
box-shadow: inset (-$border-line-width) (-$border-line-width) #4aa52e;
}
&:hover {
background-color: #92cc41;
}
}
&.layui-btn-danger {
color: #fff;
background-color: #e76e55;
&::after {
box-shadow: inset (-$border-line-width) (-$border-line-width) #8c2022;
}
&:hover {
background-color: #ce372b;
}
}
&.layui-btn-warm {
color: #212529;
background-color: #f7d51d;
&::after {
box-shadow: inset (-$border-line-width) (-$border-line-width) #e59400;
}
&:hover {
color: #212529;
background-color: #f2c409;
}
}
}
.form-search .layui-btn {
line-height: 16px;
font-size: 14px;
}
.layuimini-container .layui-table-tool .layui-inline[lay-event] {
@extend .layui-btn;
line-height: 24px;
}
.layui-table img {
image-rendering: pixelated;
}
.layui-form-checkbox[lay-skin="primary"] i {
@extend .public-border;
position: relative;
}
.layui-form-checked[lay-skin="primary"] i {
background-color: unset;
color: #212529;
font-weight: bold;
font-size: 28px;
}
.layui-btn {
font-size: 18px;
}
.layui-btn-sm {
font-size: 16px;
}
.layui-btn-xs {
font-size: 14px;
}
.layui-nav * {
font-size: 16px;
}
.layui-tab-title li {
font-size: 18px;
}
.layui-nav-tree .layui-nav-item {
border-bottom: 3px solid #212529;
}
.layuimini-header-menu>.layui-nav-item {
@extend .public-border;
border-image-outset: 0;
}
.layui-table td,
.layui-table th {
font-size: 16px;
border-width: 0 2px 2px 0;
border-style: solid;
border-color: #212529
}
.layui-input,
.layui-select,
.layui-textarea {
@extend .public-border;
}
.layui-form-label {
background-color: unset;
border: unset;
text-align: right;
color: #212529;
font-size: 16px;
font-weight: bold;
}
.layuimini-form>.layui-form-item>.layui-input-block tip,
.layuimini-form>.layui-form-item>.layui-inline tip {
font-size: 14px;
}
.layui-layer-easy .layui-layer-title {
background: unset !important;
color: #212529 !important;
font-size: 16px;
border-bottom: 1px solid #f0f0f0;
}
.layui-layer-easy .layui-layer-btn {
background: unset !important;
}
.layui-layer-easy .layui-layer-btn a {
@extend .layui-btn;
color: #212529 !important;
&.layui-layer-btn0 {
color: #fff !important;
background-color: #209cee;
&::after {
box-shadow: inset (-$border-line-width) (-$border-line-width) #006bb3;
}
&:hover {
background-color: #108de0;
}
}
}
.layui-layer-dialog .layui-layer-content {
font-size: 16px;
}
.layui-layer-easy .layui-layer-setwin>span {
color: #212529;
}
.layui-layer-easy .layui-layer-setwin>span:after {
color: #212529;
}
.layui-layer-easy .layui-layer-setwin .layui-layer-max::after,
.layui-layer-easy .layui-layer-setwin .layui-layer-max::before {
border-color: #212529;
}
.layui-layer-easy .layui-layer-setwin .layui-layer-min::before {
background-color: #212529;
}
.layui-layer {
@extend .public-border;
}
.layui-card {
@extend .public-border;
.layui-card-header {
font-size: 18px;
}
}
.layuimini-main {
@extend .public-border;
}
.layui-table-box {
@extend .public-border;
border-image-outset: 1;
margin-top: 5px;
}
.layuimini-container .layui-table-box .layui-table-header th {
color: #212529 !important;
}
.layui-table tbody tr:hover,
.layui-table thead tr,
.layui-table-click,
.layui-table-header,
.layui-table-hover,
.layui-table-mend,
.layui-table-patch,
.layui-table-tool,
.layui-table-total,
.layui-table-total tr {
background-color: unset;
}
.layui-table-header .layui-table {
margin-bottom: 0;
}
.layui-badge,
.layui-badge-rim {
position: relative;
border-radius: 0;
&::after {
content: '';
position: absolute;
left: 0;
width: 100%;
height: 100%;
top: 0;
pointer-events: none;
box-shadow: 0 4px #209cee, 0 -4px #209cee, 4px 0 #209cee, -4px 0 #209cee;
}
&.layui-bg-blue {
background-color: #209cee;
&::after {
box-shadow: 0 4px #209cee, 0 -4px #209cee, 4px 0 #209cee, -4px 0 #209cee;
}
}
&.layui-bg-gray {
background-color: #92cc41;
&::after {
box-shadow: 0 4px #92cc41, 0 -4px #92cc41, 4px 0 #92cc41, -4px 0 #92cc41;
}
}
}
.layuimini-color .elem-content li {
cursor: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAzElEQVRYR+2X0Q6AIAhF5f8/2jYXZkwEjNSVvVUjDpcrGgT7FUkI2D9xRfQETwNIiWO85wfINfQUEyxBG2ArsLwC0jioGt5zFcwF4OYDPi/mBYKm4t0U8ATgRm3ThFoAqkhNgWkA0jJLvaOVSs7j3qMnSgXWBMiWPXe94QqMBMBc1VZIvaTu5u5pQewq0EqNZvIEMCmxAawK0DNkay9QmfFNAJUXfgGgUkLaE7j/h8fnASkxHTz0DGIBMCnBeeM7AArpUd3mz2x3C7wADglA8BcWMZhZAAAAAElFTkSuQmCC) 14 0, pointer;
}

View File

@@ -1,802 +0,0 @@
// 通常用于背景色
$black-color :rgb(2, 17, 20);
// 通常用于字体颜色
$main-color :rgb(126, 252, 246);
// 通常用于边框
$less-main-color:rgb(6, 216, 215);
$plus-main-color:rgb(0, 125, 124);
// 通常用于激活状态,通常跟背景色搭配
$cover-color :rgba(62, 251, 251, 0.05);
// 更强的激活状态,适合做选项操作时使用
$active-color :rgba(62, 251, 251, 0.5);
$red-color :rgb(255, 0, 0);
$yellow-color:rgb(255, 255, 153);
$green-color :rgb(0, 255, 0);
& {
background-color: $black-color;
color: $main-color;
}
.layuimini-main {
background-color: $black-color;
}
.layuimini-container {
background-color: $black-color;
}
.layuimini-container .layui-table-tool {
background-color: $black-color;
}
$box-shape: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 0);
.layui-btn {
&.layui-btn-lg {
padding-right: 25px;
}
clip-path : $box-shape;
padding-right : 10px;
position : relative;
background-color: transparent;
border : 1px solid;
color : rgb(126, 252, 246);
text-shadow : rgb(126, 252, 246) 0px 0px 1px;
background-color: rgb(126, 252, 246);
&::before {
content: '';
display: block;
position: absolute;
z-index: -1;
clip-path: $box-shape;
width: 100%;
height: 100%;
left: -0.5px;
top: -0.5px;
background-color: $black-color;
}
&:hover::after {
content: '';
display: block;
position: absolute;
z-index: -1;
clip-path: $box-shape;
width: 100%;
height: 100%;
left: -0.5px;
top: -0.5px;
background-color: rgba(126, 252, 246, 0.2);
}
&.layui-btn-disabled {
&::after {
// todo:实现按钮禁用样式
}
}
&.layui-btn-success {
text-shadow: rgb(0, 255, 0) 0px 0px 1px;
color: rgb(0, 255, 0);
background-color: rgba(0, 255, 0);
border: unset;
&:hover::after {
background-color: rgba(0, 255, 0, 0.2);
}
}
&.layui-btn-danger {
text-shadow: rgb(255, 0, 0) 0px 0px 1px;
color: rgb(255, 0, 0);
background-color: rgb(255, 0, 0);
border: unset;
&:hover::after {
background-color: rgba(255, 0, 0, 0.2);
}
}
&.layuimini-btn-primary {
text-shadow: rgb(255, 255, 153) 0px 0px 1px;
color: rgb(255, 255, 153);
background-color: rgb(255, 255, 153);
border: unset;
&:hover::after {
background-color: rgba(255, 255, 153, 0.2);
}
}
&.layui-btn-primary {
border: unset;
}
&.layui-btn-normal {
color: $black-color;
background-color: $main-color;
border: unset;
&::before {
background-color: $main-color;
}
&:hover::after {
background-color: $main-color;
}
}
}
.layui-table {
background: $black-color;
color: $main-color;
tr {
background-color: $cover-color;
}
td {
border-color: $less-main-color;
}
}
.layui-table-header {
background-color: $black-color;
}
.layuimini-container .layui-table-box {
border-color: $less-main-color;
}
.layuimini-container .layui-table-box .layui-table-header th {
color: $main-color !important;
}
.layui-table-tool .layui-inline[lay-event] {
color: $main-color;
border: none;
position: relative;
&::after {
border-color: $main-color;
border-width: 1px;
border-style: solid;
clip-path: $box-shape;
position: absolute;
left: 0;
top: 0;
width: calc(100% - 1px);
height: calc(100% - 1px);
content: '';
display: block;
}
}
.layui-table tbody tr:hover {
background-color: rgba(126, 252, 246, 0.1);
}
.layuimini-main {
border-color: $less-main-color;
}
.layui-table-header {
border-color: $less-main-color;
}
.color-content>ul>li>a>div>span:nth-child(2) {
background-color: $black-color !important;
}
.layuimini-color .elem-content li {
clip-path: $box-shape;
}
.layuimini-color .elem-content li.layui-this {
background-color: $main-color;
color: $black-color !important;
border-color: $less-main-color;
}
.layuimini-color .more-menu-item {
color: $main-color;
&:hover {
background-color: rgba(62, 251, 251, 0.05);
}
}
.layui-layout-admin .layui-header {
background-color: $cover-color !important;
}
.layuimini-tab .layui-tab-title {
background-color: $cover-color !important;
border-color: $less-main-color;
}
.layuimini-tab .layui-tab-title span {
color: $active-color;
}
.layui-header .layuimini-menu-header-pc.layui-nav .layui-nav-item a:hover,
.layui-header .layuimini-header-menu.layuimini-pc-show.layui-nav .layui-this a {
color: $black-color !important;
}
.layui-layout-admin .layui-header .layui-nav .layui-nav-item a {
color: $main-color !important;
}
.layui-layout-admin .layui-header .layui-nav .layui-nav-item {
background-color: $active-color;
}
.layui-layout-admin .layui-header .layuimini-header-content>ul>.layui-nav-item.layui-this,
.layuimini-tool i:hover {
background-color: $main-color !important;
}
.layuimini-tab .layui-tab-control>li {
background-color: $black-color;
border-color: $less-main-color;
}
.layuimini-tab .layui-tab-title li {
border-color: $less-main-color;
}
.layui-flow-more a *,
.layui-laypage input,
.layui-table-view select[lay-ignore] {
border-color: $less-main-color;
background-color: $black-color;
color: $main-color;
}
.layui-laypage button,
.layui-laypage input {
border-color: $less-main-color;
background-color: $black-color;
color: $main-color;
}
.layuimini-container .layui-form-switch {
border-color: $less-main-color !important;
background-color: $black-color !important;
}
.layuimini-container .layui-form-onswitch {
background-color: $main-color !important;
}
.layuimini-container .layui-form-switch.layui-form-onswitch i {
background-color: $black-color !important;
}
.layuimini-container .layui-laypage .layui-laypage-curr .layui-laypage-em {
background-color: $main-color !important;
}
.layui-laypage .layui-laypage-curr em {
color: $black-color !important;
}
.layuimini-tab .layui-tab-title .layui-this .layuimini-tab-active {
background-color: $less-main-color;
}
.layui-table-view .layui-form-checkbox.layui-form-checked[lay-skin="primary"] i {
border-color: $main-color;
background-color: $main-color;
color: $black-color;
}
.layui-table-view .layui-form-checkbox[lay-skin="primary"] i {
background-color: $cover-color;
}
.layui-table-init {
background-color: $black-color;
}
.box-border-line {
position: relative;
border: 1px solid $less-main-color;
border-width: 1px;
$border-offset: 3px;
&::before {
content: '';
position: absolute;
width: 50px;
height: 20px;
transition: all 0.2s;
border: 1px solid $less-main-color;
top: -$border-offset;
left: -$border-offset;
border-right: none;
border-bottom: none;
pointer-events: none;
}
&::after {
content: "";
position: absolute;
width: 50px;
height: 20px;
transition: all 0.2s;
border: 1px solid $less-main-color;
bottom: -$border-offset;
right: -$border-offset;
border-left: none;
border-top: none;
pointer-events: none;
}
&:hover {
&::after,
&::before {
width: calc(100% + $border-offset);
height: calc(100% + $border-offset);
}
}
}
.table-search-fieldset {
.layui-input-inline {
margin-right: 0;
}
.layui-form-item:not(:last-child) {
margin-right: 10px;
@extend .box-border-line;
}
.layui-form-label {
border: unset;
}
}
.layui-form-pane .layui-form-label {
background-color: $cover-color;
color: $main-color;
}
.layuimini-container .table-search-fieldset {
color: $main-color;
border-color: $less-main-color;
}
.layui-form-select,
.layui-form-autocomplete {
dl {
color: $main-color;
background-color: $black-color;
border-color: $less-main-color;
dd {
&.layui-this {
background-color: $main-color !important;
color: $black-color;
}
&:hover {
background-color: $less-main-color !important;
color: $black-color;
}
}
}
}
.layui-iconpicker-item,
.layui-iconpicker-item:hover {
border-color: $less-main-color !important;
color: $black-color;
.layui-iconpicker-icon:hover {
border-color: $less-main-color !important;
}
}
.layui-nav-child {
background-color: $black-color;
color: $main-color;
}
.layui-layout-admin .layui-header .layui-nav .layui-nav-item .layui-nav-child a {
color: $main-color !important;
}
.layui-badge,
.layui-badge-dot,
.layui-badge-rim {
background-color: $main-color;
}
.layui-nav .layui-nav-child a:hover {
background-color: $active-color;
}
.layui-table-tool-panel {
background-color: $black-color;
}
.layui-form-checkbox[lay-skin="primary"] span {
color: $main-color;
}
.layui-table-tool-panel li:hover {
background-color: $active-color;
}
.layui-side.layui-bg-black,
.layui-side.layui-bg-black>.layuimini-menu-left>ul,
.layuimini-menu-left-zoom>ul {
background-color: $black-color !important;
}
.layui-side {
border-right: 1px solid $main-color;
}
.layui-bg-blue {
background-color: #0000ff !important;
}
.layui-bg-orange {
background-color: $yellow-color !important;
color: $black-color !important;
}
.layui-bg-green {
background-color: $green-color !important;
color: $black-color !important;
}
.layui-table-hover {
background-color: $cover-color;
}
.layui-table-grid-down {
background-color: $black-color;
color: $main-color;
border-color: unset;
}
.layui-table-tips-main {
background-color: $main-color;
color: $black-color;
}
.layui-layout-admin .layui-header .layuimini-tool i {
color: $main-color;
}
.color-red {
color: $red-color !important;
}
.layuimini-tab .layui-tab-title .layui-this span {
color: $main-color;
}
.layui-card {
background-color: $cover-color;
border-radius: 0;
@extend .box-border-line;
.layui-card-header {
color: $main-color;
}
}
.layui-text {
color: $main-color;
}
.layuimini-qiuck-module {
cursor: pointer;
a i {
background-color: $cover-color;
color: $active-color;
}
a cite {
color: $active-color;
}
&:hover {
a i {
background-color: $active-color;
color: $main-color;
}
a cite {
color: $main-color;
}
}
}
.layui-bg-number {
background-color: $cover-color;
}
.layui-input,
.layui-select,
.layui-textarea,
.city-picker-span,
.main-input {
background-color: $cover-color;
color: $main-color;
}
.city-picker-span>.title>span {
color: $main-color;
&:hover {
background-color: $main-color;
color: $black-color;
}
}
.layui-form-radio:hover *,
.layui-form-radioed,
.layui-form-radioed>i {
color: $main-color;
}
.layui-form-checked[lay-skin="primary"] i {
border-color: $main-color !important;
background-color: $main-color;
color: $black-color;
}
.layui-input:focus,
.layui-textarea:focus {
border-color: $main-color !important;
}
.layui-input:hover,
.layui-textarea:hover {
border-color: $main-color !important;
}
.layui-badge-rim,
.layui-border,
.layui-colla-content,
.layui-colla-item,
.layui-collapse,
.layui-elem-field,
.layui-form-pane .layui-form-item[pane],
.layui-form-pane .layui-form-label,
.layui-input,
.layui-layedit,
.layui-layedit-tool,
.layui-panel,
.layui-quote-nm,
.layui-select,
.layui-tab-bar,
.layui-tab-card,
.layui-tab-title,
.layui-tab-title .layui-this::after,
.layui-textarea {
border-color: $main-color !important;
}
.form-search .layui-input-inline input,
.form-search .layui-input-inline select {
border-width: 0 0 0 1px;
}
.layuimini-tab .layui-tab-tool .layui-nav-child {
border-color: $main-color;
}
.layui-nav .layui-nav-child a {
color: $main-color;
}
.layui-form-item {
margin-bottom: 12px;
}
.layuimini-upload .layuimini-upload-btn {
background-color: $black-color;
}
.layui-layer {
border: 1px solid $main-color;
background-color: $black-color;
}
.layui-layer-easy .layui-layer-title {
background-color: $plus-main-color !important;
color: $main-color !important;
}
.layui-table td,
.layui-table th,
.layui-table-col-set,
.layui-table-fixed-r,
.layui-table-grid-down,
.layui-table-header,
.layui-table-page,
.layui-table-tips-main,
.layui-table-tool,
.layui-table-total,
.layui-table-view,
.layui-table[lay-skin="line"],
.layui-table[lay-skin="row"] {
border-color: $less-main-color;
}
.layui-table tbody tr:hover,
.layui-table thead tr,
.layui-table-click,
.layui-table-header,
.layui-table-hover,
.layui-table-mend,
.layui-table-patch,
.layui-table-tool,
.layui-table-total,
.layui-table-total tr {
background-color: $black-color;
}
.hr-line {
color: $main-color;
border-color: $less-main-color;
background-color: $main-color;
}
.layui-layer-easy .layui-layer-btn {
background-color: $black-color;
border-top: 1px solid $less-main-color;
}
.layui-layer-easy .layui-layer-btn .layui-layer-btn0 {
background-color: $main-color;
border-color: $less-main-color;
color: $main-color !important;
clip-path: $box-shape;
}
.layui-layer-easy .layui-layer-btn a {
@extend .layui-btn
}
.layui-layer-shade {
background-color: #fff !important;
}
.layuimini-menu-left {
.layui-nav-tree .layui-nav-item {
margin: 5px;
width: calc(100% - 10px);
}
.layui-nav .layui-nav-item {
clip-path: $box-shape;
color: $main-color;
background-color: $active-color;
&.layui-this a {
background-color: $main-color !important;
color: $black-color !important;
}
&.layui-this {
background-color: $main-color !important;
color: $black-color !important;
span {
background-color: $main-color !important;
color: $black-color !important;
}
}
}
.layui-nav .layui-nav-item a:hover {
background-color: $active-color !important;
}
}
.layuimini-menu-left .layui-nav .layui-nav-item a,
.layuimini-menu-left-zoom.layui-nav .layui-nav-item a {
color: $main-color !important;
}
.layuimini-menu-left .layui-nav-item a span {
color: $main-color !important;
}
.layuimini-menu-left .layui-nav-item:hover a span {
color: $black-color !important;
}
.layui-layout-admin .layuimini-logo {
background-color: $black-color !important;
}
.layuimini-menu-left .layui-nav-itemed>.layui-nav-child {
background-color: $black-color !important;
}
.layuimini-menu-left .layui-nav-tree .layui-this,
.layuimini-menu-left .layui-nav-tree .layui-this>a,
.layuimini-menu-left .layui-nav-tree .layui-nav-child dd.layui-this,
.layuimini-menu-left .layui-nav-tree .layui-nav-child dd.layui-this a,
.layuimini-menu-left-zoom.layui-nav-tree .layui-this,
.layuimini-menu-left-zoom.layui-nav-tree .layui-this>a,
.layuimini-menu-left-zoom.layui-nav-tree .layui-nav-child dd.layui-this,
.layuimini-menu-left-zoom.layui-nav-tree .layui-nav-child dd.layui-this a {
background-color: $main-color !important;
color: $black-color !important;
.layui-left-nav {
color: $black-color !important;
}
}
.layui-iconpicker-icon {
border-color: $less-main-color !important;
background-color: $less-main-color !important;
}
.layui-iconpicker .layui-anim {
background-color: $black-color;
}
.layui-iconpicker .layui-iconpicker-list {
background-color: $black-color;
}
.layui-header .layui-nav .layui-nav-child dd.layui-this a,
.layui-header .layui-nav-child dd.layui-this,
.layui-layout-admin .layui-header .layui-nav .layui-nav-item .layui-nav-child .layui-this a {
background-color: $active-color !important;
}

View File

@@ -1,288 +0,0 @@
& {
color: #222;
background-color: #f0f0f0;
}
.layui-btn {
background: linear-gradient(180deg, #eee 45%, #ddd 0, #bbb);
border: 1.5px solid #888;
border-radius: 3px;
box-shadow: inset 0 -1px 1px hsla(0, 0%, 100%, .8), inset 0 1px 1px #fff;
box-sizing: border-box;
color: #222;
&:hover {
background: linear-gradient(180deg, #e5f4fd 45%, #b3e0f9 0);
border-color: #72a2c5;
}
}
.layui-layer-easy .layui-layer-btn a {
@extend .layui-btn;
color: #222 !important;
height: 26px;
line-height: 26px;
font-size: 12px;
}
.layui-layer-title {
background: linear-gradient(90deg, hsla(0, 0%, 100%, .4), rgba(0, 0, 0, .1), hsla(0, 0%, 100%, .2)), linear-gradient(55deg, transparent, rgba(0, 0, 0, .1) 20%, rgba(0, 0, 0, .1) 50%, transparent 53%), #4580c4 !important;
border: 1px solid rgba(0, 0, 0, .6);
border-radius: 6px 6px 0 0;
// box-shadow : inset 0 0 .5px .5px #fff;
height: 27px;
line-height: 27px;
color: #000 !important;
letter-spacing: 0;
font-size: 12px;
text-shadow: 0 0 10px #fff, 0 0 10px #fff, 0 0 10px #fff, 0 0 10px #fff, 0 0 10px #fff, 0 0 10px #fff, 0 0 10px #fff, 0 0 10px #fff;
padding: 0 80px 0 8px;
border: 0;
box-shadow: inset 0 .5px #fff;
}
.layui-layer-easy .layui-layer-title~.layui-layer-setwin {
height: 27px !important;
top: 1px;
}
.layui-layer-easy .layui-layer-title~.layui-layer-setwin>span {
height: 20px !important;
line-height: 20px !important;
background: linear-gradient(hsla(0, 0%, 100%, .3), hsla(0, 0%, 100%, .3) 45%, rgba(0, 0, 0, .1) 50%, rgba(0, 0, 0, .1) 75%, hsla(0, 0%, 100%, .5)) !important;
border: 0;
border-radius: 0;
border-bottom-right-radius: 0px;
border-right: 1px solid rgba(0, 0, 0, .6);
box-shadow: inset 0 0 0 .5px #eee;
box-sizing: border-box;
padding: 0;
position: relative;
margin-left: 0;
min-width: 26px;
text-align: center;
&:hover {
background: radial-gradient(circle at 50% 100%, #2aceda, transparent 60%), linear-gradient(#a9d2e8 50%, #196c9b 0) !important;
}
&:last-child {
border: 0;
border-bottom-right-radius: 5px;
}
&:first-child {
border-bottom-left-radius: 5px;
}
&.layui-layer-close1 {
background-color: #d04a37 !important;
min-width: 45px !important;
&:hover {
filter: contrast(1.3);
background-image: linear-gradient(hsla(0, 0%, 100%, .3), hsla(0, 0%, 100%, .3) 45%, rgba(0, 0, 0, .1) 50%, rgba(0, 0, 0, .1) 75%, hsla(0, 0%, 100%, .5)) !important;
}
}
}
.layui-layer-dialog {
border-radius: 20px;
}
.layui-layer-iframe {
border-radius: 20px;
}
.layui-layer:not(.layui-layer-loading) {
.layui-layer-content {
background: #f0f0f0;
border: 1px solid rgba(0, 0, 0, .6);
box-shadow: 0 -1px 1px .5px #fff;
margin: 0 6px 0 6px;
padding: 6px;
border-bottom-width: 0;
}
&::before {
background: linear-gradient(transparent 20%, hsla(0, 0%, 100%, .7) 40%, transparent 41%), linear-gradient(90deg, hsla(0, 0%, 100%, .4), rgba(0, 0, 0, .1), hsla(0, 0%, 100%, .2)), linear-gradient(55deg, transparent, rgba(0, 0, 0, .1) 20%, rgba(0, 0, 0, .1) 50%, transparent 53%), #4580c4;
border-radius: 6px;
content: "";
height: 100%;
position: absolute;
width: 100%;
z-index: -1;
}
&.layui-layer-iframe {
&::before {
height: calc(100% + 20px);
}
}
}
.layui-layer-easy .layui-layer-btn {
background: #f0f0f0;
border: 1px solid rgba(0, 0, 0, .6);
box-shadow: 0 0 1px .5px #fff;
margin: 0 6px 6px;
padding: 6px;
border-top: 0;
text-align: right !important;
}
.layui-card {
border: 1px solid rgba(0, 0, 0, .6);
border-radius: 6px;
box-shadow: 0 0 5px 1px rgba(0, 0, 0, .6);
font: 9pt Segoe UI, sans-serif;
position: relative;
z-index: 0;
&::before {
background: linear-gradient(transparent 20%, hsla(0, 0%, 100%, .7) 40%, transparent 41%), linear-gradient(90deg, hsla(0, 0%, 100%, .4), rgba(0, 0, 0, .1), hsla(0, 0%, 100%, .2)), linear-gradient(55deg, transparent, rgba(0, 0, 0, .1) 20%, rgba(0, 0, 0, .1) 50%, transparent 53%), #4580c4;
border-radius: 6px;
content: "";
height: 100%;
position: absolute;
width: 100%;
z-index: -1;
}
.layui-card-header {
align-items: center;
background: linear-gradient(90deg, hsla(0, 0%, 100%, .4), rgba(0, 0, 0, .1), hsla(0, 0%, 100%, .2)), linear-gradient(55deg, transparent, rgba(0, 0, 0, .1) 20%, rgba(0, 0, 0, .1) 50%, transparent 53%), #4580c4;
border-radius: 6px 6px 0 0;
font: 9pt Segoe UI, sans-serif;
justify-content: space-between;
padding: 6px;
border: 0;
box-shadow: inset 0 .5px #fff;
height: 15px;
color: #000;
letter-spacing: 0;
line-height: 15px;
text-shadow: 0 0 10px #fff, 0 0 10px #fff, 0 0 10px #fff, 0 0 10px #fff, 0 0 10px #fff, 0 0 10px #fff, 0 0 10px #fff, 0 0 10px #fff;
}
.layui-card-body {
background: #f0f0f0;
border: 1px solid rgba(0, 0, 0, .6);
box-shadow: 0 0 1px .5px #fff;
margin: 0 6px 6px;
padding: 6px;
}
}
.layui-tab-brief>.layui-tab-title .layui-this {
color: #222;
}
.layuimini-tab .layui-tab-control>li {
height: 27px !important;
line-height: 27px !important;
}
.layui-form-checkbox[lay-skin="primary"] i {
background: #ddd;
border: 1px solid #888;
box-shadow: inset 0 0 0 1.5px #eee, inset 0 2px 4px #888, inset -2px -3px 4px #fff;
box-sizing: border-box;
content: "";
display: inline-block;
height: 13px;
margin-right: 6px;
width: 13px;
color: transparent;
}
.layui-form-checked[lay-skin="primary"] i {
color: #16638f;
border-color: #888;
display: block;
font-weight: 700;
position: absolute;
&::before {
font-size: 14px;
}
}
.layui-form-radio:hover *,
.layui-form-radioed,
.layui-form-radioed>i {
color: #16638f;
}
.layui-input {
background-color: #fff;
border: 1px solid #ccc;
border-top-color: rgb(204, 204, 204);
border-radius: 2px;
border-top-color: #888;
box-sizing: border-box;
font: 9pt Segoe UI, sans-serif;
padding: 3px 4px 5px;
}
.layui-input,
.layui-select,
.layui-textarea {
height: unset
}
.layui-form-label {
padding: 3px 15px;
font: 9pt Segoe UI, sans-serif;
}
.layuimini-form>.layui-form-item .required::after {
top: 2px;
}
.form-search .layui-input-inline input,
.form-search .layui-input-inline select {
height: unset;
line-height: unset;
}
.form-search .layui-form-label {
height: unset;
background: unset;
text-align: right;
border: unset;
}
.layuimini-upload-btn {
.layui-btn {
height: 25px;
line-height: 25px;
}
}

View File

@@ -1,95 +0,0 @@
/*头部右侧背景色 headerRightBg */
.layui-layout-admin .layui-header {
background-color: #ffffff !important;
}
/*头部右侧选中背景色 headerRightBgThis */
.layui-layout-admin .layui-header .layuimini-header-content > ul > .layui-nav-item.layui-this, .layuimini-tool i:hover {
background-color: #e4e4e4 !important;
}
/*头部右侧字体颜色 headerRightColor */
.layui-layout-admin .layui-header .layui-nav .layui-nav-item a {
color: rgba(107, 107, 107, 0.7);
}
/**头部右侧下拉字体颜色 headerRightChildColor */
.layui-layout-admin .layui-header .layui-nav .layui-nav-item .layui-nav-child a {
color: rgba(107, 107, 107, 0.7) !important;
}
/*头部右侧鼠标选中 headerRightColorThis */
.layui-header .layuimini-menu-header-pc.layui-nav .layui-nav-item a:hover, .layui-header .layuimini-header-menu.layuimini-pc-show.layui-nav .layui-this a {
color: #565656 !important;
}
/*头部右侧更多下拉颜色 headerRightNavMore */
.layui-header .layui-nav .layui-nav-more {
border-top-color: rgba(160, 160, 160, 0.7) !important;
}
/*头部右侧更多下拉颜色 headerRightNavMore */
.layui-header .layui-nav .layui-nav-mored, .layui-header .layui-nav-itemed > a .layui-nav-more {
border-color: transparent transparent rgba(160, 160, 160, 0.7) !important;
}
/**头部右侧更多下拉配置色 headerRightNavMoreBg headerRightNavMoreColor */
.layui-header .layui-nav .layui-nav-child dd.layui-this a, .layui-header .layui-nav-child dd.layui-this, .layui-layout-admin .layui-header .layui-nav .layui-nav-item .layui-nav-child .layui-this a {
background-color: #1E9FFF !important;
color: #ffffff !important;
}
/*头部缩放按钮样式 headerRightToolColor */
.layui-layout-admin .layui-header .layuimini-tool i {
color: #565656;
}
/*logo背景颜色 headerLogoBg */
.layui-layout-admin .layuimini-logo {
background-color: #192027 !important;
}
/*logo字体颜色 headerLogoColor */
.layui-layout-admin .layuimini-logo h1 {
color: rgb(191, 187, 187);
}
/*左侧菜单更多下拉样式 leftMenuNavMore */
.layuimini-menu-left .layui-nav .layui-nav-more, .layuimini-menu-left-zoom.layui-nav .layui-nav-more {
border-top-color: rgb(191, 187, 187);
}
/*左侧菜单更多下拉样式 leftMenuNavMore */
.layuimini-menu-left .layui-nav .layui-nav-mored, .layuimini-menu-left .layui-nav-itemed > a .layui-nav-more, .layuimini-menu-left-zoom.layui-nav .layui-nav-mored, .layuimini-menu-left-zoom.layui-nav-itemed > a .layui-nav-more {
border-color: transparent transparent rgb(191, 187, 187) !important;
}
/*左侧菜单背景 leftMenuBg */
.layui-side.layui-bg-black, .layui-side.layui-bg-black > .layuimini-menu-left > ul, .layuimini-menu-left-zoom > ul {
background-color: #28333E !important;
}
/*左侧菜单选中背景 leftMenuBgThis */
.layuimini-menu-left .layui-nav-tree .layui-this, .layuimini-menu-left .layui-nav-tree .layui-this > a, .layuimini-menu-left .layui-nav-tree .layui-nav-child dd.layui-this, .layuimini-menu-left .layui-nav-tree .layui-nav-child dd.layui-this a, .layuimini-menu-left-zoom.layui-nav-tree .layui-this, .layuimini-menu-left-zoom.layui-nav-tree .layui-this > a, .layuimini-menu-left-zoom.layui-nav-tree .layui-nav-child dd.layui-this, .layuimini-menu-left-zoom.layui-nav-tree .layui-nav-child dd.layui-this a {
background-color: #1E9FFF !important
}
/*左侧菜单子菜单背景 leftMenuChildBg */
.layuimini-menu-left .layui-nav-itemed > .layui-nav-child {
background-color: #0c0f13 !important;
}
/*左侧菜单字体颜色 leftMenuColor */
.layuimini-menu-left .layui-nav .layui-nav-item a, .layuimini-menu-left-zoom.layui-nav .layui-nav-item a {
color: rgb(191, 187, 187) !important;
}
/*左侧菜单选中字体颜色 leftMenuColorThis */
.layuimini-menu-left .layui-nav .layui-nav-item a:hover, .layuimini-menu-left .layui-nav .layui-this a, .layuimini-menu-left-zoom.layui-nav .layui-nav-item a:hover, .layuimini-menu-left-zoom.layui-nav .layui-this a {
color: #ffffff !important;
}
/**tab选项卡选中颜色 tabActiveColor */
.layuimini-tab .layui-tab-title .layui-this .layuimini-tab-active {
background-color: #1e9fff;
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,41 +0,0 @@
.elem-style-normal {
@import 'normal';
}
.elem-style-demo {
@import 'demo';
}
.elem-style-sicfi {
@import 'sicfi';
}
.elem-style-gtk {
@import 'gtk';
}
.elem-style-nes {
@import 'nes';
}
.elem-style-win7 {
@import 'win7';
}
.elem-style-neomorphic {
@import 'neomorphic';
}
.elem-style-dark {
@import 'dark';
}
@font-face {
font-family: "ark-pixel";
src : url('./nes/ark-pixel-font-12px/ark-pixel-12px-zh_cn.ttf') format('truetype'),
url('./nes/ark-pixel-font-12px/ark-pixel-12px-zh_hk.ttf') format('truetype'),
url('./nes/ark-pixel-font-12px/ark-pixel-12px-zh_tr.ttf') format('truetype'),
url('./nes/ark-pixel-font-12px/ark-pixel-12px-zh_tw.ttf') format('truetype'),
url('./nes/ark-pixel-font-12px/ark-pixel-12px-ja.ttf') format('truetype'),
url('./nes/ark-pixel-font-12px/ark-pixel-12px-ko.ttf') format('truetype'),
url('./nes/ark-pixel-font-12px/ark-pixel-12px-latin.ttf') format('truetype');
}

View File

@@ -1,94 +0,0 @@
Copyright (c) 2021, TakWolf (https://ark-pixel-font.takwolf.com),
with Reserved Font Name 'Ark Pixel'.
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.

View File

@@ -48,6 +48,7 @@
position: relative;
top: 2px;
display: block;
color: #666;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
@@ -57,8 +58,6 @@
.welcome-module {
width: 100%;
height: 210px;
max-height: 210px;
overflow: hidden;
}
.panel {

View File

@@ -1,4 +1,4 @@
define(["jquery", "easy-admin", "echarts", "echarts-theme", "miniAdmin", "miniTheme", "miniTab", "swiper"], function ($, ea, echarts, undefined, miniAdmin, miniTheme, miniTab) {
define(["jquery", "easy-admin", "echarts", "echarts-theme", "miniAdmin", "miniTab", "swiper"], function ($, ea, echarts, undefined, miniAdmin, miniTab) {
return {
index: function () {
@@ -25,6 +25,28 @@ define(["jquery", "easy-admin", "echarts", "echarts-theme", "miniAdmin", "miniTh
})
});
});
layui.form.on('switch(header-theme-mode)', function (data) {
let dark_mode = this.checked
let that = $('iframe').contents()
if (dark_mode) {
$('#layuicss-theme-dark').attr({
rel: "stylesheet",
type: "text/css",
href: "/static/admin/css/layui-theme-dark.css"
})
.appendTo("head");
that.find("html").addClass('dark')
$('html').addClass('dark')
} else {
$('#layuicss-theme-dark').attr({
rel: "stylesheet",
type: "text/css",
href: ""
})
that.find("html").removeClass('dark')
$('html').removeClass('dark')
}
});
},
welcome: function () {
miniTab.listen();

View File

@@ -7,7 +7,7 @@ define(["jquery", "easy-admin"], function ($, ea) {
}
$(function () {
if (backgroundUrl) {
$('body').css('background', 'url(' + backgroundUrl + ') 0% 0% / cover no-repeat')
$('.container').css('background', 'url(' + backgroundUrl + ') 0% 0% / cover no-repeat')
}
$('.bind-password').on('click', function () {
if ($(this).hasClass('icon-5')) {
@@ -40,7 +40,7 @@ define(["jquery", "easy-admin"], function ($, ea) {
})
}, function (res) {
let data = res.data
if (data?.is_ga_code || false) {
if (data.is_ga_code) {
let elem = $('#gaCode')
elem.removeClass('layui-hide');
elem.find('input').focus()

View File

@@ -6,7 +6,6 @@ define(["jquery", "easy-admin"], function ($, ea) {
table_render_id: 'currentTableRenderId',
index_url: 'system.log/index',
export_url: 'system.log/export',
deleteMonthLog_url: 'system.log/deleteMonthLog',
};
return {
@@ -24,15 +23,8 @@ define(["jquery", "easy-admin"], function ($, ea) {
class: 'layui-btn layui-btn-sm',
icon: 'fa fa-book',
extend: 'data-width="95%" data-height="95%"'
}, {
text: '删除部分日志',
url: 'system.log/deleteMonthLog',
method: 'open',
auth: 'deleteMonthLog',
class: 'layui-btn layui-btn-sm layui-btn-danger',
icon: 'fa fa-remove',
extend: 'data-width="35%" data-height="42%"'
},]
},
]
],
cols: [[
{field: 'id', width: 80, title: 'ID', search: false},
@@ -73,20 +65,5 @@ define(["jquery", "easy-admin"], function ($, ea) {
});
ea.listen();
},
deleteMonthLog: function () {
layui.form.on('submit(submit)', function (data) {
let field = data.field
let options = {
url: ea.url(init.deleteMonthLog_url),
data: field,
}
ea.msg.confirm('确认执行该操作?重要数据请先做好相关备份!', function () {
ea.request.post(options, function (rs) {
let msg = rs.msg || '未知~'
layer.msg(msg.replace(/\n/g, '<br>'), {shade: 0.3, shadeClose: true, time: 2000})
})
})
})
}
};
});

View File

@@ -1,37 +1,31 @@
body {
body{
text-align: center;
}
h1 {
h1{
margin-top: 20px;
}
h1 img {
h1 img{
width: 120px;
height: 120px;
}
h2 {
font-size: 28px;
font-weight: normal;
color: #3C5675;
margin-bottom: 0
}
.content {
.content{
margin-top: 20px;
}
.content p {
.content p{
margin: 20px;
}
.content form {
.content form{
margin:0 auto;
width: 500px;
margin: 0 auto 20px;
margin-bottom: 20px;
}
.content form .bg {
.content form .bg{
margin-top: 20px;
background-color: #fff;
border: 1px solid #fff;
@@ -39,68 +33,51 @@ h2 {
padding: 14px 14px;
box-shadow: 0 0 8px #cccccc;
}
.content form .bg .layui-card {
background-color: #fafafa;
color: #ff8080;
font-size: 15px;
font-weight: bold;
.content form .layui-form-item:last-child{
margin-bottom:0!important;
}
.content form .layui-form-item:last-child {
margin-bottom: 0 !important;
}
.content form .layui-btn {
.content form .layui-btn{
margin-top: 20px;
}
.content .layui-elem-field legend {
.content .layui-elem-field legend{
font-size: 16px;
color: #8a8a8a;
}
.content .tips {
.content .tips{
float: left;
margin-top: 5px;
margin-bottom: 5px;
font-size: 12px;
color: #eca6a6
}
.content .admin-tips {
.content .admin-tips{
float: left;
margin-top: 5px;
margin-bottom: 5px;
font-size: 12px;
color: #eca6a6
}
.content .desc {
.content .desc{
font-size: 16px;
color: #4E5465;
margin-bottom: 30px;
}
.content .desc a {
.content .desc a{
color: #07adeb;
margin-right: 10px;
}
.content .desc a:first-child {
.content .desc a:first-child{
margin-left: 10px;
}
.error {
.error{
background: #D83E3E;
color: #fff;
padding: 15px 20px;
border-radius: 5px;
margin-bottom: 20px;
}
@media screen and (max-width: 768px) {
.content form {
@media screen and (max-width:768px) {
.content form{
width: 95%;
}
}

View File

@@ -5,9 +5,11 @@ require.config({
baseUrl: BASE_URL,
paths: {
"jquery": ["plugs/jquery-3.4.1/jquery-3.4.1.min"],
"jquery-particleground": ["plugs/jq-module/jquery.particleground.min"],
"echarts": ["plugs/echarts/echarts.min"],
"echarts-theme": ["plugs/echarts/echarts-theme"],
"easy-admin": ["plugs/easy-admin/easy-admin"],
"layuiall": ["plugs/layui-v2.x/layui.all"],
"layui": ["plugs/layui-v2.x/layui"],
"miniAdmin": ["plugs/lay-module/layuimini/miniAdmin"],
"miniMenu": ["plugs/lay-module/layuimini/miniMenu"],
@@ -18,10 +20,8 @@ require.config({
"tableSelect": ["plugs/lay-module/tableSelect/tableSelect"],
"iconPickerFa": ["plugs/lay-module/iconPicker/iconPickerFa"],
"autocomplete": ["plugs/lay-module/autocomplete/autocomplete"],
"xmSelect": ["plugs/xmSelect/xm-select"],
"vue": ["plugs/vue-2.6.10/vue.min"],
"swiper": ["plugs/swiper/swiper-bundle.min"],
"colorMode": ["plugs/colorMode/colorMode"],
}
});

View File

@@ -1,186 +0,0 @@
// @ts-ignore
define(['jquery'], function (colorMode) {
// 'use strict';
/** @type {jQuery}*/
var $ = layui.jquery;
var MOD_NAME = 'colorMode';
var defaultWindow = window;
var document = defaultWindow.document;
var colorMode = {
/**
* @typedef {object} initOptions
* @prop {string} [selector="html"] - 应用于目标元素的 CSS 选择器
* @prop {string} [attribute="class"] - 应用于目标元素的 HTML 属性
* @prop {string} [initialValue='auto'] - 初始颜色模式
* @prop {Object.<string, string>} [modes]- 颜色模式。value 为添加到 HTML 属性上的值
* @prop {(mode: string, defaultHandler: (window?: Window) => void) => void} [onChanged] - 用于处理更新的自定义处理程序,指定时,默认行为将被覆盖。
* @prop {Storage} [storage=localStorage] - 将数据持久化到 localStorage/sessionStorage 的键。传递 `null` 以禁用持久性
* @prop {string | null} [storageKey='color-scheme'] - 持久化使用的 key
* @prop {boolean} [disableTransition=true] - 禁用切换时的过渡 {@link https://paco.me/writing/disable-theme-transitions}
*
*/
/**
*
* @param {initOptions} options
* @returns {{mode: () => string; setMode: (mode: string, window?: Window) => void; }}
*/
init: function (options) {
var defaults = {
selector: 'html',
attribute: 'class',
initialValue: 'auto',
modes: {
auto: '',
light: 'light',
dark: 'dark',
},
storage: localStorage,
storageKey: 'color-scheme',
disableTransition: true,
};
var opts = $.extend(true, {}, defaults, options);
// 当前颜色模式
var state;
// 系统颜色模式
var system;
// 初始化 storage
var store =
opts.storageKey == null
? opts.initialValue
: (function () {
var v = opts.storage.getItem(opts.storageKey);
if (!v) {
opts.storage.setItem(opts.storageKey, opts.initialValue);
return opts.initialValue;
}
return v;
})();
/**
* 更新 HTML 属性值
* @param {String} selector
* @param {String} attribute
* @param {String} value
* @param {Window} win
*/
var updateHTMLAttrs = function (selector, attribute, value, win) {
win = win || defaultWindow;
var document = win.document;
var el = typeof selector === 'string' ? document.querySelector(selector) : undefined;
if (!el) return;
/**@type HTMLStyleElement */
var style;
if (opts.disableTransition) {
style = document.createElement('style');
style.appendChild(
document.createTextNode(
'*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}'
)
);
document.head.appendChild(style);
}
if (attribute === 'class') {
var current = value.split(/\s/g);
$.each(opts.modes, function (_, modeval) {
$.each((modeval || '').split(/\s/g), function (_, v) {
if (!v) return;
if (current.indexOf(v) !== -1) {
el.classList.add(v);
} else {
el.classList.remove(v);
}
});
});
} else {
el.setAttribute(attribute, value);
}
if (opts.disableTransition) {
// 调用 getComputedStyle 强制浏览器重绘
// @ts-expect-error 未使用的变量
var _ = window.getComputedStyle(style).opacity;
document.head.removeChild(style);
}
};
/**
* 更新状态
* @param {String} mode - 颜色模式
*/
var updateState = function (mode) {
store = opts.storageKey == null ? mode : opts.storage.getItem(opts.storageKey);
state = store === 'auto' ? system : store;
};
var prefersColorScheme = function () {
var isSupported = window && 'matchMedia' in window && typeof window.matchMedia === 'function';
if (!isSupported) {
system = 'light';
onChanged(system);
return;
}
var darkThemeMediaQuery = window.matchMedia('(prefers-color-scheme: dark)');
var update = function () {
var preferredDark = darkThemeMediaQuery.matches;
system = preferredDark ? 'dark' : 'light';
onChanged(system);
};
update();
if ('addEventListener' in darkThemeMediaQuery) {
darkThemeMediaQuery.addEventListener('change', update);
} else {
// @ts-ignore 已弃用
darkThemeMediaQuery.addListener(update);
}
};
prefersColorScheme();
function defaultOnChanged(win) {
updateHTMLAttrs(opts.selector, opts.attribute, opts.modes[state], win);
}
function onChanged(mode, win) {
updateState(mode);
if (opts.onChanged) {
opts.onChanged(state, defaultOnChanged);
} else {
defaultOnChanged(win);
}
}
return {
status:system,
setMode: function (mode, win) {
if (opts.storageKey) {
opts.storage.setItem(opts.storageKey, mode);
}
onChanged(mode, win);
},
mode: function () {
return state;
},
};
},
addStyle: function (id, cssStr) {
var el = /** @type {HTMLStyleElement} */ (document.getElementById(id) || document.createElement('style'));
if (!el.isConnected) {
el.type = 'text/css';
el.id = id;
document.head.appendChild(el);
}
el.textContent = cssStr;
},
};
return colorMode;
});

View File

@@ -1,15 +1,4 @@
define(["jquery", "tableSelect", "miniTheme", "xmSelect"], function ($, tableSelect, miniTheme, xmSelect) {
//切换日夜模式
window.onInitElemStyle = function () {
miniTheme.renderElemStyle();
$('iframe').each(function (index, iframe) {
if (typeof iframe.contentWindow.onInitElemStyle == "function") {
iframe.contentWindow.onInitElemStyle();
}
});
};
window.onInitElemStyle();
define(["jquery", "tableSelect"], function ($, tableSelect) {
var form = layui.form,
layer = layui.layer,

View File

@@ -607,6 +607,7 @@
}
.layuimini-color .more-menu-item {
color: #595959;
height: 50px;
line-height: 50px;
font-size: 16px;
@@ -616,6 +617,10 @@
display: block;
}
.layuimini-color .more-menu-item:hover {
background-color: whitesmoke;
}
.layuimini-color .more-menu-item:after {
color: #8c8c8c;
right: 16px;

View File

@@ -6,7 +6,7 @@
*/
define(["jquery", "miniMenu", "miniTheme", "miniTab", "colorMode"], function ($, miniMenu, miniTheme, miniTab, colorMode) {
define(["jquery", "miniMenu", "miniTheme", "miniTab"], function ($, miniMenu, miniTheme, miniTab) {
var $ = layui.$,
layer = layui.layer,
@@ -104,7 +104,7 @@ define(["jquery", "miniMenu", "miniTheme", "miniTab", "colorMode"], function ($,
* @param clearUrl
*/
renderClear: function (clearUrl) {
$('.layuimini-clear').attr('data-href', clearUrl);
$('.layuimini-clear').attr('data-href',clearUrl);
},
/**
@@ -171,7 +171,7 @@ define(["jquery", "miniMenu", "miniTheme", "miniTab", "colorMode"], function ($,
el.msExitFullscreen();
} else if (el.oRequestFullscreen) {
el.oCancelFullScreen();
} else if (el.mozCancelFullScreen) {
}else if (el.mozCancelFullScreen) {
el.mozCancelFullScreen();
} else if (el.webkitCancelFullScreen) {
el.webkitCancelFullScreen();
@@ -243,92 +243,6 @@ define(["jquery", "miniMenu", "miniTheme", "miniTab", "colorMode"], function ($,
*/
listen: function () {
layui.form.on('switch(header-theme-mode)', function (data) {
let checked = data.elem.checked;
let mode = checked ? 'dark' : 'light';
changeTheme(mode);
});
/**
* 浅色和暗色主题切换
*/
const theme = colorMode.init({
onChanged(mode, defaultHandler) {
const isAppearanceTransition =
document.startViewTransition && !window.matchMedia(`(prefers-reduced-motion: reduce)`).matches;
const isDark = mode === 'dark';
//跟随windows系统主题色的变化而变化但没法保存选择的元素风格
// var darkThemeMediaQuery = window.matchMedia('(prefers-color-scheme: dark)');
// var preferredDark = darkThemeMediaQuery.matches;
// var currMode = preferredDark ? 'dark' : 'light';
// changeTheme(currMode);
$('#change-theme').attr('class', `layui-icon layui-icon-${isDark ? 'moon' : 'light'}`);
if (!isAppearanceTransition) {
defaultHandler();
} else {
rippleViewTransition(isDark, function () {
// 动画需要
document.documentElement.classList[isDark ? 'add' : 'remove']('dark');
defaultHandler();
});
}
},
});
//切换特效
function rippleViewTransition(isDark, callback) {
// 移植自 https://github.com/vuejs/vitepress/pull/2347
// 支持 Chrome 111+
const x = event.clientX;
const y = event.clientY;
const endRadius = Math.hypot(Math.max(x, innerWidth - x), Math.max(y, innerHeight - y));
const transition = document.startViewTransition(function () {
callback && callback();
});
transition.ready.then(function () {
var clipPath = [`circle(0px at ${x}px ${y}px)`, `circle(${endRadius}px at ${x}px ${y}px)`];
document.documentElement.animate(
{
clipPath: isDark ? clipPath : [...clipPath].reverse(),
},
{
duration: 300,
easing: 'ease-in',
pseudoElement: isDark ? '::view-transition-new(root)' : '::view-transition-old(root)',
}
);
});
}
//改变主题
function changeTheme(mode) {
switch (mode) {
case 'dark':
localStorage.setItem('layuiminiBgColorId', '1');
localStorage.setItem('layuiminiElemStyleName', 'dark');
changeBgColor(1);
break;
case 'light':
localStorage.setItem('layuiminiBgColorId', '0');
localStorage.setItem('layuiminiElemStyleName', 'normal');
changeBgColor(0);
break
}
window.onInitElemStyle()
}
//改变配色
function changeBgColor(id) {
$('.layuimini-color .color-content ul .layui-this').attr('class', '');
$(this).attr('class', 'layui-this');
localStorage.setItem('layuiminiBgColorId', id);
miniTheme.render({
bgColorDefault: id,
listen: false,
});
}
/**
* 清理
*/
@@ -375,14 +289,14 @@ define(["jquery", "miniMenu", "miniTheme", "miniTab", "colorMode"], function ($,
tips = $(this).prop("innerHTML"),
isShow = $('.layuimini-tool i').attr('data-side-fold');
if (isShow == 0 && tips) {
tips = "<ul class='layuimini-menu-left-zoom layui-nav layui-nav-tree layui-this'><li class='layui-nav-item layui-nav-itemed'>" + tips + "</li></ul>";
tips = "<ul class='layuimini-menu-left-zoom layui-nav layui-nav-tree layui-this'><li class='layui-nav-item layui-nav-itemed'>"+tips+"</li></ul>" ;
window.openTips = layer.tips(tips, $(this), {
tips: [2, '#2f4056'],
time: 300000,
skin: "popup-tips",
success: function (el) {
var left = $(el).position().left - 10;
$(el).css({left: left});
skin:"popup-tips",
success:function (el) {
var left = $(el).position().left - 10 ;
$(el).css({ left:left });
element.render();
}
});
@@ -431,5 +345,6 @@ define(["jquery", "miniMenu", "miniTheme", "miniTab", "colorMode"], function ($,
};
return miniAdmin;
});

View File

@@ -41,20 +41,20 @@ define(["jquery"], function ($) {
headerRightBg: '#23262e', //头部右侧背景色
headerRightBgThis: '#0c0c0c', //头部右侧选中背景色,
headerRightColor: 'rgba(255,255,255,.7)', //头部右侧字体颜色,
headerRightChildColor: 'rgba(255,255,255,.7)', //头部右侧下拉字体颜色,
headerRightColorThis: 'rgba(255,255,255,.7)', //头部右侧鼠标选中,
headerRightChildColor: '#676767', //头部右侧下拉字体颜色,
headerRightColorThis: '#ffffff', //头部右侧鼠标选中,
headerRightNavMore: 'rgba(255,255,255,.7)', //头部右侧更多下拉颜色,
headerRightNavMoreBg: '#1aa094', //头部右侧更多下拉列表选中背景色,
headerRightNavMoreColor: 'rgba(255,255,255,.7)', //头部右侧更多下拉列表字体色,
headerRightNavMoreColor: '#ffffff', //头部右侧更多下拉列表字体色,
headerRightToolColor: '#bbe3df', //头部缩放按钮样式,
headerLogoBg: '#0c0c0c', //logo背景颜色,
headerLogoColor: 'rgba(255,255,255,.7)', //logo字体颜色,
headerLogoColor: '#ffffff', //logo字体颜色,
leftMenuNavMore: 'rgb(191, 187, 187)', //左侧菜单更多下拉样式,
leftMenuBg: '#23262e', //左侧菜单背景,
leftMenuBgThis: '#484849', //左侧菜单选中背景,
leftMenuChildBg: '#23262e', //左侧菜单子菜单背景,
leftMenuColor: 'rgba(255,255,255,.9)', //左侧菜单字体颜色,
leftMenuColorThis: 'rgba(255,255,255,.7)', //左侧菜单选中字体颜色,
leftMenuBgThis: '#737373', //左侧菜单选中背景,
leftMenuChildBg: 'rgba(0,0,0,.3)', //左侧菜单子菜单背景,
leftMenuColor: 'rgb(191, 187, 187)', //左侧菜单字体颜色,
leftMenuColorThis: '#ffffff', //左侧菜单选中字体颜色,
tabActiveColor: '#23262e', //tab选项卡选中颜色,
},
{
@@ -272,7 +272,7 @@ define(["jquery"], function ($) {
render: function (options) {
options.bgColorDefault = options.bgColorDefault || false;
options.listen = options.listen || false;
var bgcolorId = localStorage.getItem('layuiminiBgColorId');
var bgcolorId = sessionStorage.getItem('layuiminiBgcolorId');
if (bgcolorId === null || bgcolorId === undefined || bgcolorId === '') {
bgcolorId = options.bgColorDefault;
}
@@ -280,21 +280,6 @@ define(["jquery"], function ($) {
if (options.listen) miniTheme.listen(options);
},
renderElemStyle(elemStyleDefault) {
elemStyleDefault = elemStyleDefault || 'light';
let elemStyleName = localStorage.getItem('layuiminiElemStyleName');
if (!elemStyleName) elemStyleName = elemStyleDefault;
let themeModeEle = $('input[name=theme-mode]')
if (themeModeEle.length > 0) {
if (elemStyleName == 'dark') {
themeModeEle.prop('checked', true);
} else {
themeModeEle.prop('checked', false);
}
layui.form.render('checkbox', 'header-theme-mode');
}
miniTheme.buildBodyElemStyle(elemStyleName);
},
/**
* 构建主题样式
* @param bgcolorId
@@ -401,85 +386,7 @@ define(["jquery"], function ($) {
'}\n';
$('#layuimini-bg-color').html(styleHtml);
},
configElemStyle() {
var listElemStyle = [
{
title: '标准',
className: 'normal'
},
{
title: '原型',
className: 'demo',
defaultColorConfig: '12'
},
{
title: '科幻',
className: 'sicfi'
},
{
title: 'GTK',
className: 'gtk'
},
{
title: '像素',
className: 'nes',
defaultColorConfig: '12'
},
{
title: 'WIN7',
className: 'win7',
defaultColorConfig: '12'
},
{
title: '拟物',
className: 'neomorphic',
},
{
title: '暗黑',
className: 'dark',
defaultColorConfig: '1'
},
]
return listElemStyle;
},
buildBodyElemStyle(className) {
var listElemStyle = miniTheme.configElemStyle()
$.each(listElemStyle, function (index, item) {
var classNameReal = 'elem-style-' + item.className;
if ($('body').hasClass(classNameReal)) {
$('body').removeClass(classNameReal);
}
})
$('body').addClass('elem-style-' + className)
},
buildElemStyleHtml(options) {
var elemStyleName = localStorage.getItem('layuiminiElemStyleName');
if (!elemStyleName) elemStyleName = options.elemStyleDefault;
var listElemStyle = miniTheme.configElemStyle()
var html = '';
$.each(listElemStyle, function (key, val) {
if (typeof val.defaultColorConfig == 'undefined') {
val.defaultColorConfig = '0'
}
if (val.className === elemStyleName) {
html += '<li class="layui-this style-item" data-select-style="' + val.className + '" data-default-color-config="' + val.defaultColorConfig + '">\n';
} else {
html += '<li id="' + val.className + '" class="style-item" data-select-style="' + val.className + '" data-default-color-config="' + val.defaultColorConfig + '">\n';
}
html +=
val.title +
'</li>';
});
return html;
},
/**
* 构建主题选择html
* @param options
@@ -487,7 +394,7 @@ define(["jquery"], function ($) {
*/
buildBgColorHtml: function (options) {
options.bgColorDefault = options.bgColorDefault || 0;
var bgcolorId = parseInt(localStorage.getItem('layuiminiBgColorId'));
var bgcolorId = parseInt(sessionStorage.getItem('layuiminiBgcolorId'));
if (isNaN(bgcolorId)) bgcolorId = options.bgColorDefault;
var bgColorConfig = miniTheme.config();
var html = '';
@@ -550,29 +457,12 @@ define(["jquery"], function ($) {
var bgcolorId = $(this).attr('data-select-bgcolor');
$('.layuimini-color .color-content ul .layui-this').attr('class', '');
$(this).attr('class', 'layui-this');
localStorage.setItem('layuiminiBgColorId', bgcolorId);
sessionStorage.setItem('layuiminiBgcolorId', bgcolorId);
miniTheme.render({
bgColorDefault: bgcolorId,
listen: false,
});
});
$('body').on('click', '[data-select-style]', function () {
var elemStyleName = $(this).attr('data-select-style');
$(this).attr('class', 'layui-this').siblings().removeClass('layui-this');
var defaultColorConfig = $(this).attr('data-default-color-config');
if (defaultColorConfig && defaultColorConfig.length > 0) {
localStorage.setItem('layuiminiBgColorId', defaultColorConfig);
}
localStorage.setItem('layuiminiElemStyleName', elemStyleName);
miniTheme.render({
listen: false,
});
});
}
};

File diff suppressed because one or more lines are too long

View File

@@ -14,19 +14,15 @@
/>
<missing-glyph />
<glyph glyph-name="sound" unicode="&#59037;" d="M631.4-29.7c-5.1 0-10.1 1.3-14.5 3.7L277.1 162.2H116.8c-16 0-28.9 13-28.9 28.9v384c0 16 13 28.9 28.9 28.9h160.3l339.7 189.9c4.5 2.5 9.5 3.8 14.6 3.8 5.3 0 10.6-1.4 15.1-4.1 9.1-5.3 14.8-15.2 14.8-25.8v-767.6c0-10.5-5.6-20.4-14.7-25.8-4.6-2.7-9.9-4.1-15.2-4.1zM305.8 551.5v-336.7L601.4 51V716.8L305.8 551.5zM145.7 220.1h102.2v326H145.7v-326zM829.4 93c-7.1 0-13.9 2.2-19.8 6.2-7.5 5.3-12.6 13.2-14.2 22.3-1.6 9.1 0.4 18.2 5.7 25.8 48.7 69.5 74.5 151.3 74.5 236.6 0 84.1-25.2 165.1-72.7 234.1-5.2 7.6-7.2 16.7-5.5 25.8 1.7 9.1 6.8 16.9 14.3 22.2 5.8 4 12.5 6.1 19.5 6.1 11.4 0 22-5.6 28.4-14.9 55.6-80.5 84.9-175 84.9-273.2 0-99.5-30.1-195-87-276.2-6.3-9.3-16.8-14.8-28.1-14.8zM755 221.4c-4.8 0-9.5 1-13.9 2.9-8.4 3.7-14.9 10.5-18.2 19.1-3.3 8.6-3.1 18 0.6 26.4 16 36.3 24.1 75 24.1 115 0 38.6-7.5 75.9-22.4 111.1-3.6 8.5-3.7 17.9-0.2 26.4s10 15.2 18.5 18.8c4.3 1.8 8.8 2.7 13.4 2.7 13.9 0 26.4-8.3 31.8-21.1 18.5-43.7 27.9-90.2 27.9-138 0-49.6-10.1-97.7-29.9-142.8-5.6-12.4-18-20.5-31.7-20.5z" horiz-adv-x="1024" />
<glyph glyph-name="edge" unicode="&#59019;" d="M240.185509 821.062741C322.180562 871.479699 415.37494 897.48813 509.969233 895.934224 845.948962 895.934224 1023.938224 648.353161 1023.938224 456.964708c-0.199988-65.396055-25.998431-127.79229-71.795669-174.389479-45.797237-46.397201-107.993485-72.995596-173.389539-73.995536-150.390927 0-182.98896 46.197213-182.98896 63.996139 0 7.599542 2.399855 12.399252 9.599421 18.798866l1.99988 2.399855 0.799951 3.199807c20.998733 22.998612 31.798082 52.396839 31.798082 83.194981 0 157.390504-164.390082 285.382782-367.977799 285.382782-75.075471 0.599964-149.071006-17.798926-215.027027-53.796754 53.996742 115.03306 165.430019 195.188224 182.628981 207.627473 1.599903 1.099934 0.599964 1.679899 0.599964 1.679899z m31.198118-636.081624c-2.799831-59.99638 9.199445-119.992761 32.798021-174.389479 27.198359-52.796815 65.396055-101.993847 112.993183-138.591638-118.992821 22.998612-222.966548 87.794703-298.781974 178.589225C42.237452 143.383627 0 259.176641 0 380.169341c0 102.393822 124.792471 188.78861 271.983591 188.78861 73.195584 1.199928 144.791264-21.798685 203.587717-65.396054l-7.199566-2.399856c-102.993786-35.197876-196.988115-181.389056-196.988115-316.180924zM939.543315 95.986486l-1.399915-0.199987c-23.598576-37.597732-51.796875-70.195765-84.394908-98.994028-61.596284-55.996622-136.191783-90.99451-217.586873-99.793979-37.197756-0.599964-73.59556 6.399614-107.593509 22.798624-51.196911 20.598757-94.194317 59.99638-123.192567 105.993605-28.798263 47.797116-42.197454 103.393762-37.997708 159.190396-1.199928 40.197575 10.799348 80.595138 29.99819 116.392978 27.798323-66.196006 74.995475-122.592604 135.191844-161.590251 60.196368-38.997647 130.992097-58.996441 202.787766-57.196549 61.99626-0.599964 124.192507 13.399192 180.389116 40.997526l3.799771 1.799892c7.799529 4.599722 15.399071 7.799529 23.1986 0 8.999457-9.799409 3.599783-18.39889-2.399855-27.998311-0.399976-0.399976-0.599964-0.99994-0.799952-1.399916z" horiz-adv-x="1024" />
<glyph glyph-name="bot" unicode="&#59350;" d="M511.453867 861.866667c35.498667 0 63.8976-28.398933 63.8976-63.8976 0-22.9376-12.014933-42.5984-30.037334-54.0672V657.066667h306.926934c18.568533 0 33.860267-15.291733 33.860266-33.860267v-613.853867c0-18.568533-15.291733-33.860267-33.860266-33.860266H170.666667c-18.568533 0-33.860267 15.291733-33.860267 33.860266V623.2064c0 18.568533 15.291733 33.860267 33.860267 33.860267h306.926933V743.901867c-17.476267 10.922667-29.4912 30.583467-30.037333 52.974933v1.092267c0 35.498667 28.398933 63.8976 63.8976 63.8976zM809.642667 580.608H213.265067v-528.657067h596.923733l-0.546133 528.657067z m-170.3936-367.547733c4.9152 0 8.738133-3.822933 8.738133-8.738134v-51.336533c0-4.9152-3.822933-8.738133-8.738133-8.738133H383.658667c-4.9152 0-8.738133 3.822933-8.738134 8.738133v51.336533c0 4.9152 3.822933 8.738133 8.738134 8.738134h255.5904zM93.661867 504.149333c4.9152 0 8.738133-3.822933 8.738133-8.738133v-323.857067c0-4.9152-3.822933-8.738133-8.738133-8.738133H42.325333c-4.9152 0-8.738133 3.822933-8.738133 8.738133V495.4112c0 4.9152 3.822933 8.738133 8.738133 8.738133h51.336534z m886.920533 0c4.9152 0 8.738133-3.822933 8.738133-8.738133v-323.857067c0-4.9152-3.822933-8.738133-8.738133-8.738133h-51.336533c-4.9152 0-8.738133 3.822933-8.738134 8.738133V495.4112c0 4.9152 3.822933 8.738133 8.738134 8.738133h51.336533zM332.322133 435.882667c32.768 0 59.528533-26.760533 59.528534-59.528534s-26.760533-59.528533-59.528534-59.528533-59.528533 26.760533-59.528533 59.528533 26.760533 59.528533 59.528533 59.528534z m358.263467 0c32.768 0 59.528533-26.760533 59.528533-59.528534s-26.760533-59.528533-59.528533-59.528533-59.528533 26.760533-59.528533 59.528533 26.2144 59.528533 59.528533 59.528534z" horiz-adv-x="1024" />
<glyph glyph-name="leaf" unicode="&#59137;" d="M1017.948269 886.876437c-4.863707 5.785251-12.031275 9.113051-19.557222 9.113051l-26.110427 0c-258.032454 0.102394-461.847374 0.153591-611.905533-35.735447-80.635142-19.301237-142.992985-48.432282-190.606116-89.031436-51.401703-43.82456-86.420393-101.216302-107.155144-175.554223-13.77197-49.353826-20.222782-138.487656 6.96278-227.160714 10.034595-32.766026 25.700852-63.688963 46.589193-92.103251-62.255449-97.530124-116.063407-225.983185-116.063407-378.805977 0-14.130349 11.468109-25.598458 25.598458-25.598458s25.598458 11.468109 25.598458 25.598458c0 235.761795 139.665185 410.650458 222.91137 493.845446 59.7468 59.7468 127.275532 110.175762 195.367429 145.808815 63.381781 33.175601 123.947732 51.4529 170.536925 51.4529 14.130349 0 25.598458 11.468109 25.598458 25.598458s-11.468109 25.598458-25.598458 25.598458c-55.497456 0-122.667809-19.813206-194.241097-57.340545-72.597226-38.039308-144.477695-91.591282-207.80828-154.973063-26.72479-26.72479-58.876453-62.357843-90.823328-105.977615-12.389654 19.506025-22.014674 40.189579-28.619076 61.794677-25.598458 83.553366-16.178225 164.034917-6.604402 198.388047 73.211589 262.384191 351.313233 263.049751 855.858835 262.896161-60.156376-321.926204-172.328817-530.29765-333.599101-619.533873-149.597387-82.785412-297.966048-37.629733-354.845821-14.335136-11.980078 4.914904-24.06255 10.95614-35.786644 17.91892-12.133669 7.218765-27.851122 3.225406-35.069887-8.908263s-3.225406-27.851122 8.908263-35.069887c13.925561-8.2939 28.260697-15.461468 42.595834-21.349114 31.844481-13.004017 83.143791-29.694211 146.679163-35.172281 14.027955-1.228726 27.902319-1.791892 41.674289-1.791892 75.208269 0 145.860012 18.072511 210.675307 53.910352 82.375837 45.565255 153.641943 119.749585 211.904033 220.351524 68.296685 118.00889 119.698388 274.51786 152.720399 465.175173 1.279923 7.423553-0.767954 15.051893-5.631661 20.837145z" horiz-adv-x="1025" />
<glyph glyph-name="edge" unicode="&#59019;" d="M257.173915 793.74632C334.044277 841.012218 421.414006 865.395122 510.096156 863.938335 825.077152 863.938335 991.942085 631.831088 991.942085 452.404414c-0.187489-61.308802-24.373529-119.805272-67.30844-163.490137-42.93491-43.497376-101.243892-68.433371-162.552692-69.370815-140.991494 0-171.55215 43.309887-171.55215 59.996381 0 7.124571 2.249864 11.624299 8.999457 17.623936l1.874887 2.249864 0.749954 2.99982c19.686312 21.561199 29.810702 49.122037 29.810702 77.995294 0 147.553597-154.115702 267.546358-344.979186 267.546358-70.383254 0.562466-139.754068-16.686493-201.587838-50.434457 50.621946 107.843494 155.090643 182.98896 171.214669 194.650756 1.499909 1.031188 0.562466 1.574905 0.562467 1.574906z m29.248235-596.326523c-2.624842-56.246606 8.62448-112.493213 30.748145-163.490136 25.498462-49.497014 61.308802-95.619232 105.931109-129.929661-111.55577 21.561199-209.031139 82.307534-280.108101 167.427398C71.597611 158.42215 32 266.978101 32 380.408757c0 95.994208 116.992942 176.989322 254.984617 176.989322 68.62086 1.124932 135.74181-20.436267 190.863484-61.308801l-6.749593-2.249865c-96.556674-32.998009-184.676358-170.05224-184.676358-296.419616zM912.821858 113.987331l-1.312421-0.187488c-22.123665-35.247874-48.55957-65.80853-79.120226-92.806901-57.746516-52.496833-127.679797-85.307353-203.987693-93.556856-34.872896-0.562466-68.995837 5.999638-100.868915 21.37371-47.997104 19.311335-88.307172 56.246606-115.493031 99.369005-26.998372 44.809796-39.560113 96.931652-35.622852 149.240996-1.124932 37.685227 10.124389 75.557942 28.123303 109.118417 26.060928-62.058756 70.308258-114.930566 126.742354-151.49086 56.434095-36.560294 122.805091-55.309163 190.113531-53.621765 58.121494-0.562466 116.430475 12.561742 169.114796 38.435181l3.562285 1.687398c7.312058 4.312239 14.436629 7.312058 21.748688 0 8.436991-9.186946 3.374797-17.248959-2.249864-26.248416-0.374978-0.374978-0.562466-0.937444-0.749955-1.312421z" horiz-adv-x="1024" />
<glyph glyph-name="folder" unicode="&#60094;" d="M970.666667 682.666667H542.173333L429.793333 795.046667A52.986667 52.986667 0 0 1 392.08 810.666667H96a53.393333 53.393333 0 0 1-53.333333-53.333334v-704a53.393333 53.393333 0 0 1 53.333333-53.333333h874.666667a53.393333 53.393333 0 0 1 53.333333 53.333333V629.333333a53.393333 53.393333 0 0 1-53.333333 53.333334zM96 768h296.08a10.573333 10.573333 0 0 0 7.54-3.126667L481.826667 682.666667H96a53.546667 53.546667 0 0 1-10.666667-1.073334V757.333333a10.666667 10.666667 0 0 0 10.666667 10.666667z m885.333333-714.666667a10.666667 10.666667 0 0 0-10.666666-10.666666H96a10.666667 10.666667 0 0 0-10.666667 10.666666V629.333333a10.666667 10.666667 0 0 0 10.666667 10.666667h874.666667a10.666667 10.666667 0 0 0 10.666666-10.666667z" horiz-adv-x="1024" />
<glyph glyph-name="leaf" unicode="&#59137;" d="M956.681096 804.64791c-4.274742 5.084693-10.574363 8.009517-17.188965 8.009518l-22.948617 0c-226.786337 0.089995-405.920544 0.134992-537.807598-31.408108-70.87073-16.963978-125.677428-42.567435-167.524906-78.250286-45.177278-38.51768-75.955424-88.95964-94.179326-154.295703-12.104271-43.377386-17.773929-121.717666 6.119631-199.652972 8.819468-28.798265 22.588639-55.976628 40.947533-80.950123-54.716703-85.719836-102.008854-198.618034-102.008854-332.93494 0-12.419252 10.079393-22.498645 22.498645-22.498645s22.498645 10.079393 22.498644 22.498645c0 207.212515 122.752604 360.923254 195.918197 434.043849 52.511836 52.511836 111.863261 96.834166 171.709654 128.152278 55.706643 29.158243 108.938436 45.222275 149.885969 45.222276 12.419252 0 22.498645 10.079393 22.498645 22.498645s-10.079393 22.498645-22.498645 22.498644c-48.777061 0-107.813504-17.413951-170.719714-50.396963-63.806156-33.432986-126.982349-80.50015-182.643996-136.206794-23.488585-23.488585-51.746883-54.806698-79.825191-93.144388-10.889344 17.143967-19.348835 35.322872-25.153484 54.311728-22.498645 73.435576-14.219143 144.171314-5.804651 174.364494 64.346123 230.611105 308.771396 231.19607 752.21968 231.061079-52.871815-282.942953-151.460874-466.081919-293.202335-544.512193-131.482078-72.760616-261.884222-33.073008-311.87621-12.59924-10.529365 4.31974-21.148726 9.62942-31.453105 15.74905-10.664358 6.344618-24.478525 2.83483-30.823143-7.829528s-2.83483-24.478525 7.829528-30.823142c12.239263-7.289561 24.838503-13.589181 37.437745-18.76387 27.988313-11.429312 73.075598-26.098428 128.917233-30.913138 12.329257-1.079935 24.523523-1.574905 36.627793-1.574905 66.101018 0 128.197276 15.884043 185.163844 47.382145 72.400638 40.047587 135.036864 105.248659 186.243779 193.668332 60.026383 103.718751 105.203661 241.275463 134.226913 408.845367 1.124932 6.524607-0.67496 13.229203-4.949702 18.313897z" horiz-adv-x="1025" />
<glyph glyph-name="folder-open" unicode="&#60097;" d="M1003.153333 491.04a52.933333 52.933333 0 0 1-42.38 20.96H896V629.333333a53.393333 53.393333 0 0 1-53.333333 53.333334H461.253333a10.573333 10.573333 0 0 0-7.54 3.126666L344.46 795.046667A52.986667 52.986667 0 0 1 306.746667 810.666667H53.333333a53.393333 53.393333 0 0 1-53.333333-53.333334v-704a53.393333 53.393333 0 0 1 53.333333-53.333333h796.893334a53.453333 53.453333 0 0 1 51.453333 39.333333l110.546667 405.333334a52.953333 52.953333 0 0 1-9.073334 46.373333zM53.333333 768h253.413334a10.573333 10.573333 0 0 0 7.54-3.126667l109.253333-109.253333A52.986667 52.986667 0 0 1 461.253333 640H842.666667a10.666667 10.666667 0 0 0 10.666666-10.666667v-117.333333H173.773333a53.453333 53.453333 0 0 1-51.453333-39.333333L42.666667 180.633333V757.333333a10.666667 10.666667 0 0 0 10.666666 10.666667z m917.726667-312.14l-110.546667-405.333333a10.666667 10.666667 0 0 0-10.286666-7.86H63.226667a10.666667 10.666667 0 0 0-10.286667 13.473333l110.546667 405.333333A10.666667 10.666667 0 0 0 173.773333 469.333333h787a10.666667 10.666667 0 0 0 10.286667-13.473333z" horiz-adv-x="1024" />
<glyph glyph-name="folder" unicode="&#60094;" d="M947.911111 679.727408H519.417777L407.037777 792.107408A52.986667 52.986667 0 0 1 369.324444 807.727408H73.244444a53.393333 53.393333 0 0 1-53.333333-53.333334v-704a53.393333 53.393333 0 0 1 53.333333-53.333333h874.666667a53.393333 53.393333 0 0 1 53.333333 53.333333V626.394074a53.393333 53.393333 0 0 1-53.333333 53.333334zM73.244444 765.060741h296.08a10.573333 10.573333 0 0 0 7.54-3.126667L459.071111 679.727408H73.244444a53.546667 53.546667 0 0 1-10.666667-1.073334V754.394074a10.666667 10.666667 0 0 0 10.666667 10.666667z m885.333333-714.666667a10.666667 10.666667 0 0 0-10.666666-10.666666H73.244444a10.666667 10.666667 0 0 0-10.666667 10.666666V626.394074a10.666667 10.666667 0 0 0 10.666667 10.666667h874.666667a10.666667 10.666667 0 0 0 10.666666-10.666667z" horiz-adv-x="1024" />
<glyph glyph-name="folder-open" unicode="&#60097;" d="M1003.153333 488.100741a52.933333 52.933333 0 0 1-42.38 20.96H896V626.394074a53.393333 53.393333 0 0 1-53.333333 53.333334H461.253333a10.573333 10.573333 0 0 0-7.54 3.126666L344.46 792.107408A52.986667 52.986667 0 0 1 306.746667 807.727408H53.333333a53.393333 53.393333 0 0 1-53.333333-53.333334v-704a53.393333 53.393333 0 0 1 53.333333-53.333333h796.893334a53.453333 53.453333 0 0 1 51.453333 39.333333l110.546667 405.333334a52.953333 52.953333 0 0 1-9.073334 46.373333zM53.333333 765.060741h253.413334a10.573333 10.573333 0 0 0 7.54-3.126667l109.253333-109.253333A52.986667 52.986667 0 0 1 461.253333 637.060741H842.666667a10.666667 10.666667 0 0 0 10.666666-10.666667v-117.333333H173.773333a53.453333 53.453333 0 0 1-51.453333-39.333333L42.666667 177.694074V754.394074a10.666667 10.666667 0 0 0 10.666666 10.666667z m917.726667-312.14l-110.546667-405.333333a10.666667 10.666667 0 0 0-10.286666-7.86H63.226667a10.666667 10.666667 0 0 0-10.286667 13.473333l110.546667 405.333333A10.666667 10.666667 0 0 0 173.773333 466.394074h787a10.666667 10.666667 0 0 0 10.286667-13.473333z" horiz-adv-x="1024" />
<glyph glyph-name="gitee" unicode="&#59035;" d="M512-96C246.895625-96 32 118.895625 32 384S246.895625 864 512 864s480-214.895625 480-480-214.895625-480-480-480z m242.952188 533.327813h-272.568751a23.712187 23.712187 0 0 1-23.71125-23.712188l-0.024375-59.255625c0-13.08 10.607812-23.712187 23.687813-23.712187h165.96c13.104375 0 23.712187-10.607812 23.712187-23.687813v-11.855625a71.112188 71.112188 0 0 0-71.112187-71.112187h-225.215625a23.712187 23.712187 0 0 0-23.687812 23.712187V472.872187a71.112188 71.112188 0 0 0 71.087812 71.112188h331.824375a23.712187 23.712187 0 0 1 23.687812 23.71125l0.072188 59.256563a23.712187 23.712187 0 0 1-23.68875 23.712187H423.08a177.76875 177.76875 0 0 1-177.76875-177.792188V141.046875c0-13.103438 10.60875-23.712187 23.713125-23.712187h349.63125a159.984375 159.984375 0 0 1 159.984375 159.984375V413.64a23.712187 23.712187 0 0 1-23.712187 23.687812z" horiz-adv-x="1024" />
<glyph glyph-name="gitee" unicode="&#59035;" d="M512-128C229.222-128 0 101.222 0 384S229.222 896 512 896s512-229.222 512-512-229.222-512-512-512z m259.149 568.883h-290.74a25.293 25.293 0 0 1-25.292-25.293l-0.026-63.206c0-13.952 11.315-25.293 25.267-25.293h177.024c13.978 0 25.293-11.315 25.293-25.267v-12.646a75.853 75.853 0 0 0-75.853-75.853h-240.23a25.293 25.293 0 0 0-25.267 25.293V478.797a75.853 75.853 0 0 0 75.827 75.853h353.946a25.293 25.293 0 0 1 25.267 25.292l0.077 63.207a25.293 25.293 0 0 1-25.268 25.293H417.152a189.62 189.62 0 0 1-189.62-189.645V124.85c0-13.977 11.316-25.293 25.294-25.293h372.94a170.65 170.65 0 0 1 170.65 170.65V415.616a25.293 25.293 0 0 1-25.293 25.267z" horiz-adv-x="1024" />
<glyph glyph-name="github" unicode="&#59047;" d="M512 883.32190493c275.66730126 0 499.32190493-223.65460366 499.32190493-499.32190493 0-220.40901063-143.01411555-407.65472541-341.32813256-473.98131826-25.34058667-4.53550763-34.45321159 11.06830222-34.45321159 24.05067207 0 16.26957255 0.6657627 70.19633778 0.66576271 137.18869334 0 46.81142841-15.60380985 76.72913237-33.7874489 92.33294222 111.18234397 12.35821682 228.19011015 54.63413874 228.1901113 246.41536 0 54.63413874-19.51516445 98.82412715-51.34693604 133.9431003 5.20127033 13.02397952 22.09499477 63.70515285-5.20127033 132.61157604-41.61015922 13.02397952-137.18869333-51.34693603-137.18869333-51.34693604a469.36259015 469.36259015 0 0 1-249.6609519 0S291.63259904 689.58500523 250.02244096 676.56102571c-27.29626397-68.90642318-10.40253952-119.62920619-5.20127033-132.61157604-31.87338126-35.11897429-51.34693603-79.3089627-51.34693604-133.9431003 0-191.15706937 116.38361429-234.05714318 227.56595826-246.41536-14.31389411-13.02397952-27.29626397-35.11897429-31.87338126-66.95074588-28.62778937-13.02397952-101.44556715-35.11897429-144.96979285 41.61015921-27.29626397 47.47719111-76.72913237 51.34693603-76.72913351 51.34693604-48.76710571 0.6657627-3.24559189-30.54185699-3.2455919-30.541857 32.49753429-14.93804715 55.25829063-72.81777778 55.25829064-72.81777777 29.25194126-89.08735033 168.39631189-59.16964523 168.39631302-59.16964523 0-41.61015922 0.6657627-80.5988773 0.66576157-92.95709525 0-13.02397952-9.11262493-28.62778937-34.45321045-24.05067094C155.77543111-23.61311459000001 12.76131555 163.63259903999995 12.76131555 384.04160967c0 275.66730126 223.65460366 499.32190493 499.32190493 499.32190492zM201.87948715 166.21242937c1.28991459 2.62144-0.6657627 5.86703189-4.53550763 7.78109952-3.91135459 1.28991459-7.15694763 0.6657627-8.44686222-1.2899146-1.28991459-2.62144 0.6657627-5.86703189 4.53550763-7.78109952 3.24559189-1.9556773 7.15694763-1.28991459 8.44686222 1.2899146z m20.13931634-22.13660444c2.62144 1.9556773 1.9556773 6.49118493-1.2899146 10.40253952-3.24559189 3.24559189-7.78109952 4.53550763-10.40253952 1.95567729-2.62144-1.9556773-1.9556773-6.49118493 1.2899146-10.40253952 3.24559189-3.24559189 7.78109952-4.53550763 10.40253952-1.95567729z m19.51516444-29.25194127c3.24559189 2.62144 3.24559189 7.78109952 0 12.35821682-2.62144 4.53550763-7.78109952 6.49118493-11.06830222 3.91135459-3.24559189-1.9556773-3.24559189-7.15694763 0-11.69245411s8.44686222-6.49118493 11.06830222-4.53550763z m27.29626396-27.2962651c2.62144 2.62144 1.28991459 8.44686222-2.62144 12.35821795-4.53550763 4.53550763-10.40253952 5.20127033-13.02397952 1.9556773-3.24559189-2.62144-1.9556773-8.44686222 2.62144-12.35821682 4.53550763-4.53550763 10.40253952-5.20127033 13.02397952-1.95567843z m37.0746516-16.26957141c1.28991459 3.91135459-2.62144 8.44686222-8.44686223 10.40253952-5.20127033 1.28991459-11.06830222-0.6657627-12.35821681-4.53550763s2.62144-8.44686222 8.44686222-9.73677682c5.20127033-1.9556773 11.06830222 0 12.35821682 3.9113546z m40.94439651-3.24559304c0 4.53550763-5.20127033 7.78109952-11.06830222 7.15694763-5.86703189 0-10.40253952-3.24559189-10.40253952-7.15694763 0-4.53550763 4.53550763-7.78109952 11.06830222-7.15694648 5.86703189 0 10.40253952 3.24559189 10.40253952 7.15694648z m37.69880349 6.49118493c-0.6657627 3.91135459-5.86703189 6.49118493-11.69245412 5.86703303-5.86703189-1.28991459-9.73677682-5.20127033-9.11262492-9.73677796 0.6657627-3.91135459 5.86703189-6.49118493 11.69245411-5.20126918s9.73677682 5.20127033 9.11262493 9.11262492z" horiz-adv-x="1024" />

Before

Width:  |  Height:  |  Size: 326 KiB

After

Width:  |  Height:  |  Size: 322 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -212,10 +212,7 @@
var n = t.b[e];
n && n.calcPosition && n.calcPosition()
}))
}))), "object" === ("undefined" == typeof exports ? "undefined" : _typeof(exports)) ? e.exports = t.c : "function" == typeof define && n(221)
? define(function () {
return t.c
}) : window.layui && layui.define && layui.define((function (e) {
}))), "object" === ("undefined" == typeof exports ? "undefined" : _typeof(exports)) ? e.exports = t.c : "function" == typeof define && n(221) ? define(xmSelect) : window.layui && layui.define && layui.define((function (e) {
e("xmSelect", t.c)
})), window.xmSelect = t.c
}.call(this, n(215)(e))

View File

@@ -6,8 +6,8 @@
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="stylesheet" href="/static/plugs/layui-v2.x/css/layui.css" media="all">
<link rel="stylesheet" href="/static/common/css/install.css?v={:time()}" media="all">
<link rel="stylesheet" href="/static/plugs/layui-v2.x/css/layui.css?v={:time()}" media="all">
<link rel="stylesheet" href="/static/common/css/insatll.css?v={:time()}" media="all">
</head>
<body>
<h1><img src="/static/common/images/logo-1.png" alt="" style="width: 100px;height: 100px;"></h1>
@@ -32,50 +32,45 @@
</div>
{/if}
<div class="bg">
<div class="layui-card">
<div class="layui-card-body">
自动读取 .env 配置,不需要手动创建数据库
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">数据库地址</label>
<div class="layui-input-block">
<input class="layui-input" name="hostname" autocomplete="off" lay-verify="required" lay-reqtext="请输入数据库地址" placeholder="请输入数据库地址" value="{$envInfo.DB_HOST}">
<input class="layui-input" name="hostname" autocomplete="off" lay-verify="required" lay-reqtext="请输入数据库地址" placeholder="请输入数据库地址" value="127.0.0.1">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">数据库端口</label>
<div class="layui-input-block">
<input class="layui-input" name="hostport" autocomplete="off" lay-verify="required" lay-reqtext="请输入数据库端口" placeholder="请输入数据库端口" value="{$envInfo.DB_PORT}">
<input class="layui-input" name="hostport" autocomplete="off" lay-verify="required" lay-reqtext="请输入数据库端口" placeholder="请输入数据库端口" value="3306">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">数据库名称</label>
<div class="layui-input-block">
<input class="layui-input" name="database" autocomplete="off" lay-verify="required" lay-reqtext="请输入数据库名称" placeholder="请输入数据库名称" value="{$envInfo.DB_NAME}">
<input class="layui-input" name="database" autocomplete="off" lay-verify="required" lay-reqtext="请输入数据库名称" placeholder="请输入数据库名称" value="easyadmin8">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">数据表前缀</label>
<div class="layui-input-block">
<input class="layui-input" name="prefix" autocomplete="off" lay-verify="required" lay-reqtext="请输入数据表前缀" placeholder="请输入数据表前缀" value="{$envInfo.DB_PREFIX}">
<input class="layui-input" name="prefix" autocomplete="off" lay-verify="required" lay-reqtext="请输入数据表前缀" placeholder="请输入数据表前缀" value="ea8_">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">数据库账号</label>
<div class="layui-input-block">
<input class="layui-input" name="db_username" autocomplete="off" lay-verify="required" lay-reqtext="请输入数据库账号" placeholder="请输入数据库账号" value="{$envInfo.DB_USER}">
<input class="layui-input" name="db_username" autocomplete="off" lay-verify="required" lay-reqtext="请输入数据库账号" placeholder="请输入数据库账号" value="root">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">数据库密码</label>
<div class="layui-input-block">
<input type="password" class="layui-input" name="db_password" autocomplete="off" lay-verify="required" lay-reqtext="请输入数据库密码" placeholder="请输入数据库密码" value="{$envInfo.DB_PASS}">
<input type="password" class="layui-input" name="db_password" autocomplete="off" lay-verify="required" lay-reqtext="请输入数据库密码" placeholder="请输入数据库密码">
</div>
</div>
@@ -116,11 +111,11 @@
</div>
</form>
</div>
<script src="static/plugs/layui-v2.x/layui.js" charset="utf-8"></script>
<script src="static/plugs/layui-v2.x/layui.js?v={:time()}" charset="utf-8"></script>
<script>
let isInstall = '{$isInstall? 1 : 0}'
layui.use(['form', 'layer'], function () {
let $ = layui.jquery,
var $ = layui.jquery,
form = layui.form,
layer = layui.layer;
if (isInstall > 0) {
@@ -134,7 +129,7 @@
})
}
$("#admin_url").bind("input propertychange", function () {
let val = $(this).val();
var val = $(this).val();
$("#admin_name").text(val);
});
@@ -142,8 +137,8 @@
if ($(this).hasClass('layui-btn-disabled')) {
return false;
}
let _data = data.field;
let loading = layer.msg('正在安装...', {
var _data = data.field;
var loading = layer.msg('正在安装...', {
icon: 16,
shade: 0.2,
time: false
@@ -162,7 +157,7 @@
window.location.href = '/admin';
});
} else {
layer.msg(data.msg, {icon: 2, shade: 0.2, time: 3000, shadeClose: true});
layer.msg(data.msg, {icon: 2});
}
},
error: function (xhr, textstatus, thrown) {