缩进部分代码
parent
7ac5947217
commit
f66bc5cc02
|
|
@ -438,42 +438,6 @@ layui.define(['table', 'jquery', 'element', 'form', 'pearAuth', 'pearTab', 'pear
|
||||||
html +=
|
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>"
|
"<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">' +
|
html += '<div class="more-menu-list">' +
|
||||||
'<a class="more-menu-item" href="http://www.pearadmin.cn/doc/" target="_blank">' +
|
'<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> 开发文档' +
|
'<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("跳转页面");
|
alert("跳转页面");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 根 据 请 求 方 式 获 取 数 据
|
// 根 据 请 求 方 式 获 取 数 据
|
||||||
if (option.url != null) {
|
if (option.url != null) {
|
||||||
// 复制数据
|
// 复制数据
|
||||||
|
|
@ -35,7 +34,6 @@ layui.define(['table', 'laypage','jquery', 'element'], function(exports) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 根据结果进行相应结构的创建
|
// 根据结果进行相应结构的创建
|
||||||
|
|
||||||
var html = createComponent(option.data);
|
var html = createComponent(option.data);
|
||||||
|
|
||||||
$(option.elem).html(html);
|
$(option.elem).html(html);
|
||||||
|
|
@ -54,18 +52,11 @@ layui.define(['table', 'laypage','jquery', 'element'], function(exports) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function createComponent(data) {
|
function createComponent(data) {
|
||||||
|
|
||||||
|
|
||||||
var html = "<div class='pear-card'>"
|
var html = "<div class='pear-card'>"
|
||||||
|
|
||||||
var content = createCards(data);
|
var content = createCards(data);
|
||||||
|
|
||||||
var page = "<div id='cardpage'></div>"
|
var page = "<div id='cardpage'></div>"
|
||||||
|
|
||||||
content = content + page;
|
content = content + page;
|
||||||
|
|
||||||
html += content + "</div>"
|
html += content + "</div>"
|
||||||
|
|
||||||
return html;
|
return html;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -73,19 +64,14 @@ layui.define(['table', 'laypage','jquery', 'element'], function(exports) {
|
||||||
/** 创建指定数量的卡片 */
|
/** 创建指定数量的卡片 */
|
||||||
function createCards(data) {
|
function createCards(data) {
|
||||||
|
|
||||||
|
|
||||||
var content = "<div class='layui-row layui-col-space30'>";
|
var content = "<div class='layui-row layui-col-space30'>";
|
||||||
|
|
||||||
$.each(data, function(i, item) {
|
$.each(data, function(i, item) {
|
||||||
|
|
||||||
content += createCard(item);
|
content += createCard(item);
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
content += "</div>"
|
content += "</div>"
|
||||||
|
|
||||||
return content;
|
return content;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,6 @@ layui.define(['table', 'jquery', 'element'], function(exports) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// 根 据 请 求 方 式 获 取 数 据
|
// 根 据 请 求 方 式 获 取 数 据
|
||||||
if (option.async) {
|
if (option.async) {
|
||||||
option.data = getData(option.url);
|
option.data = getData(option.url);
|
||||||
|
|
@ -45,7 +44,6 @@ layui.define(['table', 'jquery', 'element'], function(exports) {
|
||||||
if (option.control != false) {
|
if (option.control != false) {
|
||||||
|
|
||||||
createMenuAndControl(option);
|
createMenuAndControl(option);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
createMenu(option);
|
createMenu(option);
|
||||||
}
|
}
|
||||||
|
|
@ -298,7 +296,6 @@ layui.define(['table', 'jquery', 'element'], function(exports) {
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
|
||||||
controlItem = '<li pear-href="' + item.href + '" pear-title="' + item.title + '" pear-id="' + item.id +
|
controlItem = '<li pear-href="' + item.href + '" pear-title="' + item.title + '" pear-id="' + item.id +
|
||||||
'" class="layui-nav-item"><a href="#">' + item.title + '</a></li>';
|
'" class="layui-nav-item"><a href="#">' + item.title + '</a></li>';
|
||||||
|
|
||||||
|
|
@ -427,8 +424,6 @@ layui.define(['table', 'jquery', 'element'], function(exports) {
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
content += '<div class="toast"> 无 内 容 </div>';
|
content += '<div class="toast"> 无 内 容 </div>';
|
||||||
|
|
||||||
/* 暂 无 数 据 */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
content += '</dl>';
|
content += '</dl>';
|
||||||
|
|
@ -436,7 +431,6 @@ layui.define(['table', 'jquery', 'element'], function(exports) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function downShow(option) {
|
function downShow(option) {
|
||||||
|
|
||||||
$("body #" + option.elem).on("click", "a[menu-type='0']", function() {
|
$("body #" + option.elem).on("click", "a[menu-type='0']", function() {
|
||||||
|
|
||||||
if (!$("#" + option.elem).is(".pear-nav-mini")) {
|
if (!$("#" + option.elem).is(".pear-nav-mini")) {
|
||||||
|
|
@ -463,6 +457,7 @@ layui.define(['table', 'jquery', 'element'], function(exports) {
|
||||||
});
|
});
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
$(this).parent().addClass("layui-nav-itemed");
|
$(this).parent().addClass("layui-nav-itemed");
|
||||||
|
|
||||||
ele.animate({
|
ele.animate({
|
||||||
|
|
@ -473,7 +468,6 @@ layui.define(['table', 'jquery', 'element'], function(exports) {
|
||||||
});
|
});
|
||||||
$(this).parent().removeClass("layui-nav-itemed");
|
$(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");
|
$(this).children(".layui-nav-child").removeClass("layui-nav-hover");
|
||||||
|
|
||||||
//判断当前是dd,还是 layui-nav-item
|
|
||||||
|
|
||||||
$(this).children(".layui-nav-child").css({
|
$(this).children(".layui-nav-child").css({
|
||||||
left: '0px'
|
left: '0px'
|
||||||
});
|
});
|
||||||
|
|
@ -530,6 +522,5 @@ layui.define(['table', 'jquery', 'element'], function(exports) {
|
||||||
$("#" + option.elem + " dd").off('mouseenter').unbind('mouseleave');
|
$("#" + option.elem + " dd").off('mouseenter').unbind('mouseleave');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
exports(MOD_NAME, new pearMenu());
|
exports(MOD_NAME, new pearMenu());
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -56,8 +56,6 @@ layui.define(['table', 'jquery', 'element'], function(exports) {
|
||||||
|
|
||||||
function createHtml(option) {
|
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>' +
|
'<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;">';
|
'<div class="layui-nav-child layui-tab pear-notice" style="left: -200px;">';
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue