diff --git a/admin/data/menu.json b/admin/data/menu.json index c93961e..b451056 100644 --- a/admin/data/menu.json +++ b/admin/data/menu.json @@ -24,7 +24,7 @@ "icon": "layui-icon layui-icon-console", "type": 1, "openType": "_iframe", - "href": "http://www.baidu.com" + "href": "http://www.bing.com" }, { "id": 15, "title": "主题预览", @@ -406,4 +406,4 @@ "href": "component/code/index.html" }] } -] +] \ No newline at end of file diff --git a/component/pear/module/admin.js b/component/pear/module/admin.js index 581237b..4efb9aa 100644 --- a/component/pear/module/admin.js +++ b/component/pear/module/admin.js @@ -110,23 +110,11 @@ layui.define(['message', 'table', 'jquery', 'element', 'yaml', 'form', 'tab', 'm } this.bodyRender = function(param) { + body.on("click", ".refresh", function() { - var refreshA = $(".refresh a"); - refreshA.removeClass("layui-icon-refresh-1"); - refreshA.addClass("layui-anim"); - refreshA.addClass("layui-anim-rotate"); - refreshA.addClass("layui-anim-loop"); - refreshA.addClass("layui-icon-loading"); - if (param.tab.muiltTab) bodyTab.refresh(400); - else bodyFrame.refresh(400); - setTimeout(function() { - refreshA.addClass("layui-icon-refresh-1"); - refreshA.removeClass("layui-anim"); - refreshA.removeClass("layui-anim-rotate"); - refreshA.removeClass("layui-anim-loop"); - refreshA.removeClass("layui-icon-loading"); - }, 600) + refresh(); }) + if (param.tab.muiltTab) { bodyTab = pearTab.render({ elem: 'content', @@ -155,6 +143,7 @@ layui.define(['message', 'table', 'jquery', 'element', 'yaml', 'form', 'tab', 'm } } }); + bodyTab.click(function(id) { if (!param.tab.keepState) { bodyTab.refresh(false); @@ -198,14 +187,6 @@ layui.define(['message', 'table', 'jquery', 'element', 'yaml', 'form', 'tab', 'm }, param.other.keepLoad) } - this.collaspe = function(param) { - if (param.menu.collaspe) { - if ($(window).width() >= 768) { - collaspe() - } - } - } - this.themeRender = function(option) { if (option.theme.allowCustom === false) { $(".setting").remove(); @@ -226,7 +207,20 @@ layui.define(['message', 'table', 'jquery', 'element', 'yaml', 'form', 'tab', 'm localStorage.setItem("theme-menu", menu); this.menuSkin(menu); } + + this.collaspe = function(param) { + if (param.menu.collaspe) { + if ($(window).width() >= 768) { + collaspe() + } + } + } + /** + * 主题切换 + * + * @param theme 目标主题 + * */ this.menuSkin = function(theme) { var pearAdmin = $(".pear-admin"); pearAdmin.removeClass("light-theme"); @@ -234,18 +228,34 @@ layui.define(['message', 'table', 'jquery', 'element', 'yaml', 'form', 'tab', 'm pearAdmin.addClass(theme); } + /** + * 注销事件 + * + * @param callback 回调实现 + * */ this.logout = function(callback) { logout = callback; } + /** + * 消息点击 + * + * @param callback 回调实现 + * */ this.message = function(callback) { if (callback != null) { msgInstance.click(callback); - } else { - msgInstance.click(messageTip); } } + /** + * 页面切换 + * + * @param id 编号 + * @param title 标题 + * @param url 路径 + * @param load 动画 + * */ this.jump = function(id, title, url) { if (config.tab.muiltTab) { bodyTab.addTabOnly({ @@ -254,30 +264,40 @@ layui.define(['message', 'table', 'jquery', 'element', 'yaml', 'form', 'tab', 'm url: url, icon: null, close: true - }, 300); + }, 400); } else { sideMenu.selectItem(id); bodyFrame.changePage(url, title, true); } } + + /** + * 页面刷新 + * + * @param null 无 + * @param null 无 + * */ + this.refresh = function() { + refresh(); + } }; - - var messageTip = function(id, title, context, form) { - layer.open({ - type: 1, - title: '消息', //标题 - area: ['390px', '330px'], //宽高 - shade: 0.4, //遮罩透明度 - content: "
来源 :   " + - form + "
标题 :   " + title + - "
内容 :   " + context + "
", //支持获取DOM元素 - btn: ['确认'], //按钮组 - scrollbar: false, //屏蔽浏览器滚动条 - yes: function(index) { //layer.msg('yes'); //点击确定回调 - layer.close(index); - showToast(); - } - }); + + function refresh() { + var refreshA = $(".refresh a"); + refreshA.removeClass("layui-icon-refresh-1"); + refreshA.addClass("layui-anim"); + refreshA.addClass("layui-anim-rotate"); + refreshA.addClass("layui-anim-loop"); + refreshA.addClass("layui-icon-loading"); + if (config.tab.muiltTab) bodyTab.refresh(400); + else bodyFrame.refresh(400); + setTimeout(function() { + refreshA.addClass("layui-icon-refresh-1"); + refreshA.removeClass("layui-anim"); + refreshA.removeClass("layui-anim-rotate"); + refreshA.removeClass("layui-anim-loop"); + refreshA.removeClass("layui-icon-loading"); + }, 600) } function collaspe() { @@ -297,11 +317,7 @@ layui.define(['message', 'table', 'jquery', 'element', 'yaml', 'form', 'tab', 'm } body.on("click", ".logout", function() { - // 回调 - var result = logout(); - - if (result) { - // 清空缓存 + if (logout()) { bodyTab.clear(); } }) @@ -464,7 +480,6 @@ layui.define(['message', 'table', 'jquery', 'element', 'yaml', 'form', 'tab', 'm function buildLinkHtml() { var links = ""; $.each(config.links, function(i, value) { - // value.target 存在,则为新窗口打开,增加 target="_blank" 属性 links += '' + ' ' + value.title + diff --git a/component/pear/module/frame.js b/component/pear/module/frame.js index ded92ce..63e3e23 100644 --- a/component/pear/module/frame.js +++ b/component/pear/module/frame.js @@ -50,7 +50,7 @@ layui.define(['table', 'jquery', 'element'], function (exports) { var loading = $("#"+elem).find(".pear-frame-loading"); setTimeout(function(){ loading.css({display:'none'}); - },800) + },400) } } diff --git a/component/pear/pear.js b/component/pear/pear.js index 79c3854..00f8f38 100644 --- a/component/pear/pear.js +++ b/component/pear/pear.js @@ -5,7 +5,7 @@ window.rootPath = (function(src) { layui.config({ base: rootPath + "module/", - version: "3.8.9" + version: "3.8.10" }).extend({ admin: "admin", // 框架布局组件 menu: "menu", // 数据菜单组件 diff --git a/index.html b/index.html index c211c09..fd2846a 100644 --- a/index.html +++ b/index.html @@ -103,9 +103,9 @@ // 初始化消息回调 admin.message(); - // 重写消息回调 [消息列表点击事件] + // 实现消息回调 [消息列表点击事件] // admin.message(function(id, title, context, form) {}); }) - + diff --git a/view/console/console1.html b/view/console/console1.html index 22b8940..3dc5d54 100644 --- a/view/console/console1.html +++ b/view/console/console1.html @@ -238,6 +238,15 @@ 后 端 +
+
+ 寄语 +
+
+ 原想将澎湃的爱平平稳稳放置你手心,奈何我徒有一股蛮劲,只顾向你跑去,一个不稳跌的满身脏兮兮。试图爬起的我, + 心想你会不会笑我 "献爱献的这样笨拙, 怎么不知避开爱里的埋伏" +
+
diff --git a/view/console/console2.html b/view/console/console2.html index 7c3d3d2..d820a1f 100644 --- a/view/console/console2.html +++ b/view/console/console2.html @@ -183,11 +183,6 @@ 4月30日 22:43 回复 -
  • -

    我一向憎恶为自己的温饱打算的人。人是高于温饱的。

    - 5月12日 01:25 - 回复 -
  • 接近,是我对一切的态度,是我对一切态度的距离

    diff --git a/view/document/button.html b/view/document/button.html index fe84cfe..0a55ea3 100644 --- a/view/document/button.html +++ b/view/document/button.html @@ -297,7 +297,7 @@ }) $("[to]").click(function(){ - top.layui.admin.jump(14,"百度一下","http://www.baidu.com",true) + top.layui.admin.jump(14,"百度一下","http://www.bing.com",true) }) }) diff --git a/view/system/user.html b/view/system/user.html index def3343..ca95806 100644 --- a/view/system/user.html +++ b/view/system/user.html @@ -159,6 +159,7 @@ page: true, cols: cols, skin: 'line', + size: 'sm', toolbar: '#user-toolbar', defaultToolbar: [{ title: '刷新',