From 1bff3bbc09b47f5cc271ec4dc6a45c06a634beb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=B1=E7=9C=A0=E4=BB=AA=E5=BC=8F?= <854085467@qq.com> Date: Thu, 6 Aug 2020 09:10:59 +0800 Subject: [PATCH] topBar component --- admin/data/menu.json | 8 + component/pear/css/pear-module/topBar.css | 5 + component/pear/css/pear.css | 5 +- component/pear/module/admin.js | 3 - component/pear/module/button.js | 15 -- view/document/topBar.html | 280 ++++++++++++++++++++++ 6 files changed, 296 insertions(+), 20 deletions(-) create mode 100644 component/pear/css/pear-module/topBar.css create mode 100644 view/document/topBar.html diff --git a/admin/data/menu.json b/admin/data/menu.json index e8be8bd..9f97c31 100644 --- a/admin/data/menu.json +++ b/admin/data/menu.json @@ -178,6 +178,14 @@ "type": 1, "openType": "_iframe", "href": "view/document/count.html" + }, + { + "id": 2045, + "title": "顶部返回", + "icon": "layui-icon layui-icon-face-cry", + "type": 1, + "openType": "_iframe", + "href": "view/document/topBar.html" } ] }] diff --git a/component/pear/css/pear-module/topBar.css b/component/pear/css/pear-module/topBar.css new file mode 100644 index 0000000..71799b9 --- /dev/null +++ b/component/pear/css/pear-module/topBar.css @@ -0,0 +1,5 @@ +.layui-fixbar li{ + border-radius: 4px; + background-color: #5FB878; + color: white; + } \ No newline at end of file diff --git a/component/pear/css/pear.css b/component/pear/css/pear.css index 66bfc39..dc225e2 100644 --- a/component/pear/css/pear.css +++ b/component/pear/css/pear.css @@ -2,9 +2,11 @@ @import url("pear-module/dtree/font/dtreefont.css"); +@import url("pear-module/icon/iconfont.css"); +@import url("pear-module/dtree/dtree.css"); @import url("pear-module/iconPicker.css"); @import url("pear-module/treetable.css"); -@import url("pear-module/icon/iconfont.css"); +@import url("pear-module/topBar.css"); @import url("pear-module/select.css"); @import url("pear-module/layout.css"); @import url("pear-module/notice.css"); @@ -20,4 +22,3 @@ @import url("pear-module/step.css"); @import url("pear-module/tab.css"); @import url("pear-module/tag.css"); -@import url("pear-module/dtree/dtree.css"); diff --git a/component/pear/module/admin.js b/component/pear/module/admin.js index 3da8e8e..22887d7 100644 --- a/component/pear/module/admin.js +++ b/component/pear/module/admin.js @@ -66,7 +66,6 @@ layui.define(['table', 'jquery', 'element', 'form', 'tab', 'menu', 'frame'], }] }); bodyTab.click(function(id) { - // 选 项 卡 切 换 刷 新 if(!param.tab.keepState){ bodyTab.refresh(false); } @@ -163,9 +162,7 @@ layui.define(['table', 'jquery', 'element', 'form', 'tab', 'menu', 'frame'], } this.colorSet = function(color) { - var style = ''; - // 自 定 义 菜 单 配 色 style += '.light-theme .pear-nav-tree .layui-this a:hover,.light-theme .pear-nav-tree .layui-this,.light-theme .pear-nav-tree .layui-this a,.pear-nav-tree .layui-this a,.pear-nav-tree .layui-this{background-color: ' + diff --git a/component/pear/module/button.js b/component/pear/module/button.js index 000a4a7..f05f014 100644 --- a/component/pear/module/button.js +++ b/component/pear/module/button.js @@ -17,38 +17,23 @@ layui.define(['jquery', 'element', 'util'], function(exports) { time: opt.time ? opt.time : false, done: opt.done ? opt.done : function(){} } - var load = $(option.elem).text(); - $(option.elem).html(""); - var buttons = $(option.elem); - if (option.time == "") { - - } else { - setTimeout(function() { - buttons.html(load); - option.done(); - }, option.time); } - option.text = load; - return new button(option); } button.prototype.stop = function(success) { - $(this.option.elem).html(this.option.text); - success(); - } exports(MOD_NAME, new button()); diff --git a/view/document/topBar.html b/view/document/topBar.html new file mode 100644 index 0000000..611584b --- /dev/null +++ b/view/document/topBar.html @@ -0,0 +1,280 @@ + + + + + 首页三 + + + + + + + +
+ +
+ +
+
动态
+
+
+
+
+
+

七彩枫叶 在 Pear Admin 专区 回答问题

+ 几秒前 +
+
+
+
+
+

简 在 Pear Admin 专区 进行了 提问

+ 2天前 +
+
+
+
+
+

恒宇少年 将 Pear Admin 更新至 2.3.0 版本

+ 7天前 +
+
+
+
+
+

如花 在 Pear Admin 社区 发布了 建议

+ 7天前 +
+
+
+
+
+

就眠仪式 在 Pear Admin 社区 发布了 建议

+ 8天前 +
+
+
+
+
+

贤心 在 Pear Admin 专区 进行了 提问

+ 8天前 +
+
+
+
+
+

七彩枫叶 在 Pear Admin 专区 回答问题

+ 几秒前 +
+
+
+
+
+

简 在 Pear Admin 专区 进行了 提问

+ 2天前 +
+
+
+
+
+

恒宇少年 将 Pear Admin 更新至 2.3.0 版本

+ 7天前 +
+
+
+
+
+

如花 在 Pear Admin 社区 发布了 建议

+ 7天前 +
+
+
+
+
+

就眠仪式 在 Pear Admin 社区 发布了 建议

+ 8天前 +
+
+
+
+
+

贤心 在 Pear Admin 专区 进行了 提问

+ 8天前 +
+
+
+
+
+

七彩枫叶 在 Pear Admin 专区 回答问题

+ 几秒前 +
+
+
+
+
+

简 在 Pear Admin 专区 进行了 提问

+ 2天前 +
+
+
+
+
+

恒宇少年 将 Pear Admin 更新至 2.3.0 版本

+ 7天前 +
+
+
+
+
+

如花 在 Pear Admin 社区 发布了 建议

+ 7天前 +
+
+
+
+
+

就眠仪式 在 Pear Admin 社区 发布了 建议

+ 8天前 +
+
+
+
+
+

贤心 在 Pear Admin 专区 进行了 提问

+ 8天前 +
+
+
+
+
+

七彩枫叶 在 Pear Admin 专区 回答问题

+ 几秒前 +
+
+
+
+
+

简 在 Pear Admin 专区 进行了 提问

+ 2天前 +
+
+
+
+
+

恒宇少年 将 Pear Admin 更新至 2.3.0 版本

+ 7天前 +
+
+
+
+
+

如花 在 Pear Admin 社区 发布了 建议

+ 7天前 +
+
+
+
+
+

就眠仪式 在 Pear Admin 社区 发布了 建议

+ 8天前 +
+
+
+
+
+

次等水货 在 Pear Admin 专区 进行了 提问

+ 8天前 +
+
+
+
+
+

七彩枫叶 在 Pear Admin 专区 回答问题

+ 几秒前 +
+
+
+
+
+

简 在 Pear Admin 专区 进行了 提问

+ 2天前 +
+
+
+
+
+

恒宇少年 将 Pear Admin 更新至 2.3.0 版本

+ 7天前 +
+
+
+
+
+

如花 在 Pear Admin 社区 发布了 建议

+ 7天前 +
+
+
+
+
+

就眠仪式 在 Pear Admin 社区 发布了 建议

+ 8天前 +
+
+
+
+
+

微笑刺客 在 Pear Admin 专区 进行了 提问

+ 8天前 +
+
+
+
+
+
+ +
+ + + + + + +