From 2f652151fe509cfaf592a85ea3be140669c53fe1 Mon Sep 17 00:00:00 2001 From: msr123 Date: Fri, 20 Oct 2023 08:34:02 +0000 Subject: [PATCH] =?UTF-8?q?fixed=200ae0125=20from=20https://gitee.com/szms?= =?UTF-8?q?r/Pear-Admin-Layui/pulls/131=20=E5=8D=95=E9=A1=B5=E6=A8=A1?= =?UTF-8?q?=E5=BC=8F=E4=B8=8B=E5=A2=9E=E5=8A=A0=E9=9D=A2=E5=8C=85=E5=B1=91?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: msr123 --- admin/css/admin.dark.css | 9 +++++++++ component/pear/css/module/page.css | 28 +++++++++++++++++++++++++++- component/pear/module/admin.js | 16 ++++++++++++++-- component/pear/module/page.js | 13 ++++++++++++- 4 files changed, 62 insertions(+), 4 deletions(-) diff --git a/admin/css/admin.dark.css b/admin/css/admin.dark.css index 3b225b4..2660bb2 100644 --- a/admin/css/admin.dark.css +++ b/admin/css/admin.dark.css @@ -51,6 +51,15 @@ color: var(--global-primary-color) !important; } +.pear-admin-dark .pear-page-title{ + background-color: #141414 !important; + border: #141414 1px solid; +} + +.pear-admin-dark .pear-page-title .breadcrumb{ + color: #fff !important; +} + /** side */ .pear-admin-dark .layui-side { box-shadow: 0 3px 4px rgba(0, 0, 0, .6) !important; diff --git a/component/pear/css/module/page.css b/component/pear/css/module/page.css index 2131056..6ecf6f6 100644 --- a/component/pear/css/module/page.css +++ b/component/pear/css/module/page.css @@ -5,7 +5,7 @@ height: 100%; } -.pear-page .dot { +/*.pear-page .dot { width: 5px; height: 24px; background-color: #5FB878; @@ -20,6 +20,32 @@ line-height: 40px; background-color: white; border: whitesmoke 1px solid; +}*/ + +.pear-page .dot { + width: 5px; + height: 24px; + background-color: var(--global-primary-color); + margin-top: 8px; + margin-left: 15px; + border-radius: 2px; + display: inline-block; +} + +.pear-page .pear-page-title { + height: 40px; + line-height: 40px; + background-color: white; + border: whitesmoke 1px solid; +} + +.pear-page .breadcrumb { + position: absolute; + margin-top: 0px; + margin-left: 12px; + color: dimgray; + display: inline-block; + letter-spacing: 2px; } .pear-page .pear-page-content, diff --git a/component/pear/module/admin.js b/component/pear/module/admin.js index 3231e94..64b6013 100644 --- a/component/pear/module/admin.js +++ b/component/pear/module/admin.js @@ -262,7 +262,7 @@ layui.define(['jquery', 'tools', 'element', 'yaml', 'form', 'tabPage', 'menu', ' if (data.menuOpenType === "_layer") { layer.open({ type: 2, title: data.menuTitle, content: data.menuUrl, area: ['80%', '80%'], maxmin: true }) } else { - bodyFrame.changePage({ href: data.menuUrl, type: data.menuOpenType }); + bodyFrame.changePage({ href: data.menuUrl, type: data.menuOpenType, path:data.menuPath }); } compatible() }) @@ -380,7 +380,7 @@ layui.define(['jquery', 'tools', 'element', 'yaml', 'form', 'tabPage', 'menu', ' this.footer(footer); } - this.footer = function (footer) { + /*this.footer = function (footer) { var bodyDOM = $(".pear-admin .layui-body"); var footerDOM = $(".pear-admin .layui-footer"); if (footer === true || footer === "true") { @@ -390,6 +390,18 @@ layui.define(['jquery', 'tools', 'element', 'yaml', 'form', 'tabPage', 'menu', ' footerDOM.addClass("close"); bodyDOM.css("bottom", ""); } + }*/ + + this.footer = function (footer) { + var bodyDOM = $("#content"); + var footerDOM = $(".pear-admin .layui-footer"); + if (footer === true || footer === "true") { + footerDOM.removeClass("close"); + bodyDOM.css({"height": "calc(100% - 44px)"}); + } else { + footerDOM.addClass("close"); + bodyDOM.css({"height": "calc(100% - 0px)"}); + } } this.bannerSkin = function (theme) { diff --git a/component/pear/module/page.js b/component/pear/module/page.js index de90eac..9f06076 100644 --- a/component/pear/module/page.js +++ b/component/pear/module/page.js @@ -17,6 +17,7 @@ layui.define(['jquery', 'element'], function (exports) { var option = { elem: opt.elem, url: opt.url, + path: opt.path, width: opt.width || "100%", height: opt.height || "100%", title: opt.title @@ -51,6 +52,7 @@ layui.define(['jquery', 'element'], function (exports) { } }); } + $('.pear-page-title .breadcrumb').html(options.path); $frame.attr("type", options.type); $frame.attr("href", options.href); } @@ -95,7 +97,7 @@ layui.define(['jquery', 'element'], function (exports) { function renderContent(option) { - $("#" + option.elem).html(` + /* $("#" + option.elem).html(`
@@ -107,6 +109,15 @@ layui.define(['jquery', 'element'], function (exports) {
`); + */ + $("#" + option.elem).html(` +
+
    +
  • + +
+
+
`); var $frame = $("#" + option.elem).find(".pear-page-content"); -- Gitee