style: pear admin layui 更新到 4.0 正式版

This commit is contained in:
zhengxinonly
2023-11-26 00:51:02 +08:00
parent 3086c1a1fa
commit 2ffddda02b
18 changed files with 3689 additions and 3044 deletions
+3 -62
View File
@@ -358,7 +358,6 @@ layui.define(["table", "jquery", "element"], function (exports) {
}
}
element.init();
downShow(option);
option.done();
}
@@ -368,7 +367,9 @@ layui.define(["table", "jquery", "element"], function (exports) {
option.theme +
'"><ul lay-filter="' +
option.elem +
'" class="layui-nav arrow pear-menu layui-nav-tree pear-nav-tree">';
'" class="layui-nav arrow pear-menu layui-nav-tree pear-nav-tree" ' +
(option.accordion ? "lay-accordion" : "") +
">";
$.each(option.data, function (i, item) {
var content = '<li class="layui-nav-item" >';
if (i == option.defaultOpen) {
@@ -684,66 +685,6 @@ layui.define(["table", "jquery", "element"], function (exports) {
return content;
}
function downShow(option) {
$("body #" + option.elem).on("click", "a[menu-type='0']", function () {
if (!$("#" + option.elem).is(".pear-nav-mini")) {
var superEle = $(this).parent();
var ele = $(this).next(".layui-nav-child");
var heights = ele.children("dd").length * 48;
if ($(this).parent().is(".layui-nav-itemed")) {
if (option.accordion) {
var currentDom = $(this)
.parent()
.siblings(".layui-nav-itemed")
.children(".layui-nav-child");
currentDom.animate(
{
height: "0px",
},
240,
function () {
currentDom.css({
height: "auto",
});
$(this).parent().removeClass("layui-nav-itemed");
$(this)
.find(".layui-nav-itemed")
.removeClass("layui-nav-itemed");
},
);
}
ele.height(0);
ele.animate(
{
height: heights + "px",
},
240,
function () {
ele.css({
height: "auto",
});
},
);
} else {
$(this).parent().addClass("layui-nav-itemed");
ele.animate(
{
height: "0px",
},
240,
function () {
ele.css({
height: "auto",
});
$(this).parent().removeClass("layui-nav-itemed");
},
);
}
}
});
}
/** 二 级 悬 浮 菜 单*/
function isHoverMenu(b, option) {
if (b) {