缩进部分代码
parent
7ac5947217
commit
f66bc5cc02
|
|
@ -438,42 +438,6 @@ layui.define(['table', 'jquery', 'element', 'form', 'pearAuth', 'pearTab', 'pear
|
|||
html +=
|
||||
"<div class='select-color'><div class='select-color-title'>主题色</div><div class='select-color-content'><span class='select-color-item ' style='background-color:#FF5722;'></span><span class='select-color-item layui-icon layui-icon-ok' style='background-color:#5FB878;'></span><span class='select-color-item' style='background-color:#1E9FFF;'></span><span class='select-color-item' style='background-color:#FFB800;'></span><span class='select-color-item' style='background-color:darkgray;'></span></div></div>"
|
||||
|
||||
// var muiltTab =
|
||||
// '<div class="layui-form-item">' +
|
||||
// '<div class="layui-input-inline">' +
|
||||
// '<input type="checkbox" checked name="switch" lay-skin="switch">' +
|
||||
// '</div>' +
|
||||
// '<label style="font-size:13.5px;" class="layui-form-label">多选项卡</label>' +
|
||||
// '</div>';
|
||||
|
||||
// var showLogo =
|
||||
// '<div class="layui-form-item">' +
|
||||
// '<div class="layui-input-inline">' +
|
||||
// '<input type="checkbox" name="switch" checked lay-skin="switch">' +
|
||||
// '</div>' +
|
||||
// '<label style="font-size:13.5px;" class="layui-form-label">菜单标题</label>' +
|
||||
// '</div>';
|
||||
|
||||
|
||||
// var menuType =
|
||||
// '<div class="layui-form-item">' +
|
||||
// '<div class="layui-input-inline">' +
|
||||
// '<input type="checkbox" name="switch" checked lay-skin="switch">' +
|
||||
// '</div>' +
|
||||
// '<label style="font-size:13.5px;" class="layui-form-label">系统菜单</label>' +
|
||||
// '</div>';
|
||||
|
||||
// html +=
|
||||
// '<div class="layui-form" style="padding-top:20px!important;">\n' +
|
||||
// '<div class="pearone-color">\n' +
|
||||
// '<div class="color-title">更多设置</div>\n' +
|
||||
// '<div class="color-content">\n' +
|
||||
// '<ul>\n' + muiltTab + showLogo + menuType + '</ul>\n' +
|
||||
// '</div>\n' +
|
||||
// '</div></div>';
|
||||
|
||||
|
||||
|
||||
html += '<div class="more-menu-list">' +
|
||||
'<a class="more-menu-item" href="http://www.pearadmin.cn/doc/" target="_blank">' +
|
||||
'<i class="layui-icon layui-icon-read" style="font-size: 19px;"></i> 开发文档' +
|
||||
|
|
|
|||
|
|
@ -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 = "<div class='pear-card'>"
|
||||
|
||||
var content = createCards(data);
|
||||
|
||||
var page = "<div id='cardpage'></div>"
|
||||
|
||||
content = content + page;
|
||||
|
||||
html += content + "</div>"
|
||||
|
||||
return html;
|
||||
var content = createCards(data);
|
||||
var page = "<div id='cardpage'></div>"
|
||||
content = content + page;
|
||||
html += content + "</div>"
|
||||
return html;
|
||||
}
|
||||
|
||||
|
||||
/** 创建指定数量的卡片 */
|
||||
function createCards(data) {
|
||||
|
||||
|
||||
var content = "<div class='layui-row layui-col-space30'>";
|
||||
|
||||
$.each(data, function(i, item) {
|
||||
|
||||
content += createCard(item);
|
||||
|
||||
})
|
||||
|
||||
content += "</div>"
|
||||
|
||||
return content;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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 = '<li pear-href="' + item.href + '" pear-title="' + item.title + '" pear-id="' + item.id +
|
||||
'" class="layui-nav-item"><a href="#">' + item.title + '</a></li>';
|
||||
|
||||
|
|
@ -427,8 +424,6 @@ layui.define(['table', 'jquery', 'element'], function(exports) {
|
|||
|
||||
} else {
|
||||
content += '<div class="toast"> 无 内 容 </div>';
|
||||
|
||||
/* 暂 无 数 据 */
|
||||
}
|
||||
|
||||
content += '</dl>';
|
||||
|
|
@ -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());
|
||||
})
|
||||
|
|
|
|||
|
|
@ -56,9 +56,7 @@ layui.define(['table', 'jquery', 'element'], function(exports) {
|
|||
|
||||
function createHtml(option) {
|
||||
|
||||
|
||||
|
||||
var notice = '<li class="layui-nav-item" lay-unselect="">' +
|
||||
var notice = '<li class="layui-nav-item" lay-unselect="">' +
|
||||
'<a href="#" class="notice layui-icon layui-icon-notice"><span class="layui-badge-dot"></span></a>' +
|
||||
'<div class="layui-nav-child layui-tab pear-notice" style="left: -200px;">';
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue