From a6ae1de91005efe6d304c661552f7e641ba4e188 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: Fri, 24 Jul 2020 10:53:10 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=91=E7=8A=B6=E7=BB=93=E6=9E=84=20?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=20=E6=A0=91=E7=8A=B6=E7=BB=93=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- admin/data/menu.json | 28 --------------------- component/pear/module/admin.js | 8 ++++-- component/pear/module/topBar.js | 14 +++++++++++ component/pear/pear.js | 3 ++- view/console/console1.html | 14 +++++------ view/document/dtree.html | 44 +++++++++++++++++++++++++++++++-- 6 files changed, 71 insertions(+), 40 deletions(-) create mode 100644 component/pear/module/topBar.js diff --git a/admin/data/menu.json b/admin/data/menu.json index 0a98555..cf8487c 100644 --- a/admin/data/menu.json +++ b/admin/data/menu.json @@ -26,34 +26,6 @@ "openType": "_blank", "href": "http://www.baidu.com" }] - }, { - "id": "document", - "title": "框架文档", - "type": 0, - "icon": "layui-icon layui-icon-console", - "href": "", - "children": [{ - "id": 301, - "title": "配置文件", - "icon": "layui-icon layui-icon-console", - "type": 1, - "openType": "_iframe", - "href": "view/console/conole.html" - }, { - "id": 302, - "title": "数据菜单", - "icon": "layui-icon layui-icon-console", - "type": 1, - "openType": "_iframe", - "href": "view/console/cosole2.html" - }, { - "id": 303, - "title": "主题配置", - "icon": "layui-icon layui-icon-console", - "type": 1, - "openType": "_blank", - "href": "http://www.baidu.com" - }] }, { "id": "component", diff --git a/component/pear/module/admin.js b/component/pear/module/admin.js index 0daca11..437549d 100644 --- a/component/pear/module/admin.js +++ b/component/pear/module/admin.js @@ -25,7 +25,6 @@ layui.define(['table', 'jquery', 'element', 'form', 'tab', 'menu', 'frame'], } this.logoRender = function(option) { - $(".layui-logo .logo").attr("src", option.logo.image); $(".layui-logo .title").html(option.logo.title); } @@ -64,7 +63,7 @@ layui.define(['table', 'jquery', 'element', 'form', 'tab', 'menu', 'frame'], url: option.tab.index.href, title: option.tab.index.title, close: false - }] //初始化数据 + }] }); bodyTab.click(function(id) { @@ -89,6 +88,9 @@ layui.define(['table', 'jquery', 'element', 'form', 'tab', 'menu', 'frame'], }) sideMenu.click(function(dom, data) { + + console.log(data.menuUrl); + bodyTab.addTabOnly({ id: data.menuId, title: data.menuTitle, @@ -122,6 +124,8 @@ layui.define(['table', 'jquery', 'element', 'form', 'tab', 'menu', 'frame'], }, 600) }) sideMenu.click(function(dom, data) { + console.log(data.menuUrl); + bodyFrame.changePage(data.menuUrl, data.menuPath, true); compatible() }) diff --git a/component/pear/module/topBar.js b/component/pear/module/topBar.js new file mode 100644 index 0000000..64a1cfb --- /dev/null +++ b/component/pear/module/topBar.js @@ -0,0 +1,14 @@ +layui.define(['jquery', 'element','util'], function(exports) { + "use strict"; + + var MOD_NAME = 'topBar', + $ = layui.jquery, + util = layui.util, + element = layui.element; + + var topBar = new function() { + + util.fixbar({}); + } + exports(MOD_NAME,topBar); +}); \ No newline at end of file diff --git a/component/pear/pear.js b/component/pear/pear.js index 7f7099f..e4e1852 100644 --- a/component/pear/pear.js +++ b/component/pear/pear.js @@ -26,5 +26,6 @@ layui.config({ dtree:"dtree", tinymce:"tinymce/tinymce", area:"area", - count:"count" + count:"count", + topBar: "topBar" }); diff --git a/view/console/console1.html b/view/console/console1.html index f03a271..d8317ba 100644 --- a/view/console/console1.html +++ b/view/console/console1.html @@ -48,7 +48,7 @@