From 8587eacbc60cf11a4701080787b08a0f84565256 Mon Sep 17 00:00:00 2001 From: chf <156704883@qq.com> Date: Fri, 13 May 2022 23:22:33 +0800 Subject: [PATCH 1/2] =?UTF-8?q?1.=E4=BF=AE=E5=A4=8D=20rootPath=20=E5=9C=A8?= =?UTF-8?q?=E8=B0=B7=E6=AD=8C=E6=B5=8F=E8=A7=88=E5=99=A8=E6=97=A0=E6=95=88?= =?UTF-8?q?=E9=97=AE=E9=A2=98=202.=E5=B7=A6=E4=BE=A7=E8=8F=9C=E5=8D=95?= =?UTF-8?q?=E5=B1=82=E6=AC=A1=E6=95=88=E6=9E=9C=E9=97=AE=E9=A2=98=EF=BC=88?= =?UTF-8?q?=E6=9C=89=E5=9B=BE=E6=A0=87=E5=92=8C=E6=97=A0=E5=9B=BE=E6=A0=87?= =?UTF-8?q?=E6=B7=B7=E5=90=88=E6=97=B6=E5=A5=BD=E5=83=8F=E6=9C=89=E7=82=B9?= =?UTF-8?q?=E5=81=8F=E7=A7=BB,=E8=BF=98=E4=B8=8D=E5=AE=8C=E7=BE=8E?= =?UTF-8?q?=EF=BC=89=203.=E5=A4=B4=E9=83=A8=E8=8F=9C=E5=8D=95=E4=B8=AD=20?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E8=B5=84=E6=96=99=E5=92=8C=E6=B3=A8=E9=94=80?= =?UTF-8?q?=E7=99=BB=E9=99=86=E8=8F=9C=E5=8D=95=E7=83=AD=E7=82=B9=E6=95=88?= =?UTF-8?q?=E6=9E=9C=204.=E5=A4=B4=E9=83=A8=E8=8F=9C=E5=8D=95=E5=BC=B9?= =?UTF-8?q?=E5=87=BA=E7=9A=84=E6=B6=88=E6=81=AF=E4=B8=AD=20=E9=80=9A?= =?UTF-8?q?=E7=9F=A5=E3=80=81=E6=B6=88=E6=81=AF=E3=80=81=E5=BE=85=E5=8A=9E?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=88=86=E9=9A=94=E6=95=88=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- admin/css/admin.css | 4 ++ admin/data/menu.json | 2 +- component/pear/css/module/menu.css | 14 ++++- component/pear/module/theme.js | 1 + component/pear/pear.js | 88 ++++++++++++++++-------------- 5 files changed, 64 insertions(+), 45 deletions(-) diff --git a/admin/css/admin.css b/admin/css/admin.css index 234f8d8..b81ffbf 100644 --- a/admin/css/admin.css +++ b/admin/css/admin.css @@ -489,4 +489,8 @@ body, text-align: center; box-shadow: 0 1px 2px 0 rgba(0, 0, 0, .15); line-height: 30px; +} + +.message .layui-tab-title li:not(:last-child) { + border-right: 1px solid #eee; } \ No newline at end of file diff --git a/admin/data/menu.json b/admin/data/menu.json index d3d0a0e..b197347 100644 --- a/admin/data/menu.json +++ b/admin/data/menu.json @@ -50,7 +50,7 @@ "children": [{ "id": 201, "title": "基础组件", - "icon": "layui-icon layui-icon-console", + "icon": "layui-icon ", "type": 0, "children": [ { diff --git a/component/pear/css/module/menu.css b/component/pear/css/module/menu.css index d52aecd..e597914 100644 --- a/component/pear/css/module/menu.css +++ b/component/pear/css/module/menu.css @@ -51,6 +51,14 @@ margin-right: 12px; } +.pear-nav-tree .layui-nav-item dd a i { + margin-left: 26px; +} + +.pear-nav-tree .layui-nav-item dd dl dd a i{ + margin-left: 38px; +} + .pear-nav-tree .layui-nav-item a span { letter-spacing: 2px; font-size: 13.5px; @@ -153,11 +161,13 @@ .pear-nav-tree .layui-nav-hover a i { display: none; } +/* .pear-nav-tree .layui-nav-child dd a span { margin-left: 26px !important; -} +}*/ .pear-nav-tree .layui-nav-child dd a i { - display: none; + /*display: none;*/ + visibility: visible; } .pear-nav-tree .layui-nav-hover dd a span { margin-left: 0px !important; diff --git a/component/pear/module/theme.js b/component/pear/module/theme.js index b59ec9a..c020c01 100644 --- a/component/pear/module/theme.js +++ b/component/pear/module/theme.js @@ -73,6 +73,7 @@ layui.define(["jquery","layer"], function (exports) { style += '.pear-tab-menu .item:hover{background-color:'+color+'!important}' style += '.layui-form-danger:focus {border-color:#FF5722 !important}' style += '.pear-admin .user .layui-this a:hover{color:white!important}' + style += '.pear-admin .user a:hover{color:'+color+'!important}' style += '.pear-notice .layui-this{color:'+color+'!important}' style += '.layui-form-radio:hover *, .layui-form-radioed, .layui-form-radioed>i{color:' + color + ' !important}'; style += '.pear-btn:hover {color: '+color+';background-color: ' + second + ';}' diff --git a/component/pear/pear.js b/component/pear/pear.js index a3c0641..6769551 100644 --- a/component/pear/pear.js +++ b/component/pear/pear.js @@ -1,43 +1,47 @@ -window.rootPath = (function(src) { - src = document.scripts[document.scripts.length - 1].src; - return src.substring(0, src.lastIndexOf("/") + 1); -})(); +//window.onload = (function(){ + window.rootPath = (function(src) { + src = document.currentScript.src || document.scripts[document.scripts.length - 1].src ; + console.log("src=",src,"sub=",src.substring(0, src.lastIndexOf("/") + 1)); + return src.substring(0, src.lastIndexOf("/") + 1); + })(); + console.log("rootPath=",rootPath); + layui.config({ + base: rootPath + "module/", + version: "3.9.6" + }).extend({ + admin: "admin", // 框架布局组件 + menu: "menu", // 数据菜单组件 + frame: "frame", // 内容页面组件 + tab: "tab", // 多选项卡组件 + echarts: "echarts", // 数据图表组件 + echartsTheme: "echartsTheme", // 数据图表主题 + hash: "hash", // 数据加密组件 + select: "select", // 下拉多选组件 + drawer: "drawer", // 抽屉弹层组件 + notice: "notice", // 消息提示组件 + step:"step", // 分布表单组件 + tag:"tag", // 多标签页组件 + popup:"popup", // 弹层封装 + treetable:"treetable", // 树状表格 + dtree:"dtree", // 树结构 + tinymce:"tinymce/tinymce", // 编辑器 + area:"area", // 省市级联 + count:"count", // 数字滚动组件 + topBar: "topBar", // 置顶组件 + button: "button", // 加载按钮 + design: "design", // 表单设计 + card: "card", // 数据卡片组件 + loading: "loading", // 加载组件 + cropper:"cropper", // 裁剪组件 + convert:"convert", // 数据转换 + yaml:"yaml", // yaml 解析组件 + context: "context", // 上下文组件 + http: "http", // ajax请求组件 + theme: "theme", // 主题转换 + message: "message", // 通知组件 + toast: "toast" // 消息通知 + }).use(['layer', 'theme'], function () { + layui.theme.changeTheme(window, false); + }); +//})(); -layui.config({ - base: rootPath + "module/", - version: "3.9.6" -}).extend({ - admin: "admin", // 框架布局组件 - menu: "menu", // 数据菜单组件 - frame: "frame", // 内容页面组件 - tab: "tab", // 多选项卡组件 - echarts: "echarts", // 数据图表组件 - echartsTheme: "echartsTheme", // 数据图表主题 - hash: "hash", // 数据加密组件 - select: "select", // 下拉多选组件 - drawer: "drawer", // 抽屉弹层组件 - notice: "notice", // 消息提示组件 - step:"step", // 分布表单组件 - tag:"tag", // 多标签页组件 - popup:"popup", // 弹层封装 - treetable:"treetable", // 树状表格 - dtree:"dtree", // 树结构 - tinymce:"tinymce/tinymce", // 编辑器 - area:"area", // 省市级联 - count:"count", // 数字滚动组件 - topBar: "topBar", // 置顶组件 - button: "button", // 加载按钮 - design: "design", // 表单设计 - card: "card", // 数据卡片组件 - loading: "loading", // 加载组件 - cropper:"cropper", // 裁剪组件 - convert:"convert", // 数据转换 - yaml:"yaml", // yaml 解析组件 - context: "context", // 上下文组件 - http: "http", // ajax请求组件 - theme: "theme", // 主题转换 - message: "message", // 通知组件 - toast: "toast" // 消息通知 -}).use(['layer', 'theme'], function () { - layui.theme.changeTheme(window, false); -}); \ No newline at end of file -- Gitee From 6cbf171cfc174e7ed216d67c2dea2c400a25de08 Mon Sep 17 00:00:00 2001 From: chf <156704883@qq.com> Date: Sat, 14 May 2022 14:37:41 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=8E=BB=E9=99=A4=E6=97=A0=E7=94=A8?= =?UTF-8?q?=E7=9A=84=E8=B0=83=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- component/pear/pear.js | 89 ++++++++++++++++++++---------------------- 1 file changed, 43 insertions(+), 46 deletions(-) diff --git a/component/pear/pear.js b/component/pear/pear.js index 6769551..c56ac38 100644 --- a/component/pear/pear.js +++ b/component/pear/pear.js @@ -1,47 +1,44 @@ -//window.onload = (function(){ - window.rootPath = (function(src) { - src = document.currentScript.src || document.scripts[document.scripts.length - 1].src ; - console.log("src=",src,"sub=",src.substring(0, src.lastIndexOf("/") + 1)); - return src.substring(0, src.lastIndexOf("/") + 1); - })(); - console.log("rootPath=",rootPath); - layui.config({ - base: rootPath + "module/", - version: "3.9.6" - }).extend({ - admin: "admin", // 框架布局组件 - menu: "menu", // 数据菜单组件 - frame: "frame", // 内容页面组件 - tab: "tab", // 多选项卡组件 - echarts: "echarts", // 数据图表组件 - echartsTheme: "echartsTheme", // 数据图表主题 - hash: "hash", // 数据加密组件 - select: "select", // 下拉多选组件 - drawer: "drawer", // 抽屉弹层组件 - notice: "notice", // 消息提示组件 - step:"step", // 分布表单组件 - tag:"tag", // 多标签页组件 - popup:"popup", // 弹层封装 - treetable:"treetable", // 树状表格 - dtree:"dtree", // 树结构 - tinymce:"tinymce/tinymce", // 编辑器 - area:"area", // 省市级联 - count:"count", // 数字滚动组件 - topBar: "topBar", // 置顶组件 - button: "button", // 加载按钮 - design: "design", // 表单设计 - card: "card", // 数据卡片组件 - loading: "loading", // 加载组件 - cropper:"cropper", // 裁剪组件 - convert:"convert", // 数据转换 - yaml:"yaml", // yaml 解析组件 - context: "context", // 上下文组件 - http: "http", // ajax请求组件 - theme: "theme", // 主题转换 - message: "message", // 通知组件 - toast: "toast" // 消息通知 - }).use(['layer', 'theme'], function () { - layui.theme.changeTheme(window, false); - }); -//})(); +window.rootPath = (function(src) { + src = document.currentScript.src || document.scripts[document.scripts.length - 1].src ; + return src.substring(0, src.lastIndexOf("/") + 1); +})(); +layui.config({ + base: rootPath + "module/", + version: "3.9.6" +}).extend({ + admin: "admin", // 框架布局组件 + menu: "menu", // 数据菜单组件 + frame: "frame", // 内容页面组件 + tab: "tab", // 多选项卡组件 + echarts: "echarts", // 数据图表组件 + echartsTheme: "echartsTheme", // 数据图表主题 + hash: "hash", // 数据加密组件 + select: "select", // 下拉多选组件 + drawer: "drawer", // 抽屉弹层组件 + notice: "notice", // 消息提示组件 + step:"step", // 分布表单组件 + tag:"tag", // 多标签页组件 + popup:"popup", // 弹层封装 + treetable:"treetable", // 树状表格 + dtree:"dtree", // 树结构 + tinymce:"tinymce/tinymce", // 编辑器 + area:"area", // 省市级联 + count:"count", // 数字滚动组件 + topBar: "topBar", // 置顶组件 + button: "button", // 加载按钮 + design: "design", // 表单设计 + card: "card", // 数据卡片组件 + loading: "loading", // 加载组件 + cropper:"cropper", // 裁剪组件 + convert:"convert", // 数据转换 + yaml:"yaml", // yaml 解析组件 + context: "context", // 上下文组件 + http: "http", // ajax请求组件 + theme: "theme", // 主题转换 + message: "message", // 通知组件 + toast: "toast" // 消息通知 +}).use(['layer', 'theme'], function () { + layui.theme.changeTheme(window, false); +}); + -- Gitee