From f66bc5cc023f12ea30298d5b4965bd61af5f71a6 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: Mon, 6 Jul 2020 17:54:01 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BC=A9=E8=BF=9B=E9=83=A8=E5=88=86=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- component/layui/lay/extends/pearAdmin.js | 36 ----------------------- component/layui/lay/extends/pearCard.js | 24 ++++----------- component/layui/lay/extends/pearMenu.js | 13 ++------ component/layui/lay/extends/pearNotice.js | 4 +-- 4 files changed, 8 insertions(+), 69 deletions(-) diff --git a/component/layui/lay/extends/pearAdmin.js b/component/layui/lay/extends/pearAdmin.js index 0a419ca..9f286d9 100644 --- a/component/layui/lay/extends/pearAdmin.js +++ b/component/layui/lay/extends/pearAdmin.js @@ -438,42 +438,6 @@ layui.define(['table', 'jquery', 'element', 'form', 'pearAuth', 'pearTab', 'pear html += "
主题色
" - // var muiltTab = - // '
' + - // '
' + - // '' + - // '
' + - // '' + - // '
'; - - // var showLogo = - // '
' + - // '
' + - // '' + - // '
' + - // '' + - // '
'; - - - // var menuType = - // '
' + - // '
' + - // '' + - // '
' + - // '' + - // '
'; - - // html += - // '
\n' + - // '
\n' + - // '
更多设置
\n' + - // '
\n' + - // '
    \n' + muiltTab + showLogo + menuType + '
\n' + - // '
\n' + - // '
'; - - - html += '
' + '' + ' 开发文档' + diff --git a/component/layui/lay/extends/pearCard.js b/component/layui/lay/extends/pearCard.js index b9108c4..f418dff 100644 --- a/component/layui/lay/extends/pearCard.js +++ b/component/layui/lay/extends/pearCard.js @@ -27,7 +27,6 @@ layui.define(['table', 'laypage','jquery', 'element'], function(exports) { alert("跳转页面"); } } - // 根 据 请 求 方 式 获 取 数 据 if (option.url != null) { // 复制数据 @@ -35,7 +34,6 @@ layui.define(['table', 'laypage','jquery', 'element'], function(exports) { } // 根据结果进行相应结构的创建 - var html = createComponent(option.data); $(option.elem).html(html); @@ -54,38 +52,26 @@ layui.define(['table', 'laypage','jquery', 'element'], function(exports) { } function createComponent(data) { - - var html = "
" - - var content = createCards(data); - - var page = "
" - - content = content + page; - - html += content + "
" - - return html; + var content = createCards(data); + var page = "
" + content = content + page; + html += content + "
" + return html; } /** 创建指定数量的卡片 */ function createCards(data) { - var content = "
"; - $.each(data, function(i, item) { content += createCard(item); }) - content += "
" - return content; - } diff --git a/component/layui/lay/extends/pearMenu.js b/component/layui/lay/extends/pearMenu.js index 10e82a1..84ec4fd 100644 --- a/component/layui/lay/extends/pearMenu.js +++ b/component/layui/lay/extends/pearMenu.js @@ -32,7 +32,6 @@ layui.define(['table', 'jquery', 'element'], function(exports) { } } - // 根 据 请 求 方 式 获 取 数 据 if (option.async) { option.data = getData(option.url); @@ -45,7 +44,6 @@ layui.define(['table', 'jquery', 'element'], function(exports) { if (option.control != false) { createMenuAndControl(option); - } else { createMenu(option); } @@ -298,7 +296,6 @@ layui.define(['table', 'jquery', 'element'], function(exports) { } else { - controlItem = '
  • ' + item.title + '
  • '; @@ -427,8 +424,6 @@ layui.define(['table', 'jquery', 'element'], function(exports) { } else { content += '
    无 内 容
    '; - - /* 暂 无 数 据     */ } content += ''; @@ -436,7 +431,6 @@ layui.define(['table', 'jquery', 'element'], function(exports) { } function downShow(option) { - $("body #" + option.elem).on("click", "a[menu-type='0']", function() { if (!$("#" + option.elem).is(".pear-nav-mini")) { @@ -463,8 +457,9 @@ layui.define(['table', 'jquery', 'element'], function(exports) { }); } else { + $(this).parent().addClass("layui-nav-itemed"); - + ele.animate({ height: "0px" }, 200, function() { @@ -473,7 +468,6 @@ layui.define(['table', 'jquery', 'element'], function(exports) { }); $(this).parent().removeClass("layui-nav-itemed"); }); - } } }) @@ -515,8 +509,6 @@ layui.define(['table', 'jquery', 'element'], function(exports) { $(this).children(".layui-nav-child").removeClass("layui-nav-hover"); - //判断当前是dd,还是 layui-nav-item - $(this).children(".layui-nav-child").css({ left: '0px' }); @@ -530,6 +522,5 @@ layui.define(['table', 'jquery', 'element'], function(exports) { $("#" + option.elem + " dd").off('mouseenter').unbind('mouseleave'); } } - exports(MOD_NAME, new pearMenu()); }) diff --git a/component/layui/lay/extends/pearNotice.js b/component/layui/lay/extends/pearNotice.js index 0f98c9e..cb459ed 100644 --- a/component/layui/lay/extends/pearNotice.js +++ b/component/layui/lay/extends/pearNotice.js @@ -56,9 +56,7 @@ layui.define(['table', 'jquery', 'element'], function(exports) { function createHtml(option) { - - - var notice = '
  • ' + + var notice = '
  • ' + '' + '
    ';