style: pear admin layui 更新到 4.0 正式版
This commit is contained in:
@@ -94,8 +94,8 @@ hr {
|
||||
line-height: 0;
|
||||
margin: 10px 0;
|
||||
padding: 0;
|
||||
border: none !important;
|
||||
border-bottom: 1px solid #eee !important;
|
||||
border: none;
|
||||
border-bottom: 1px solid #eee;
|
||||
clear: both;
|
||||
overflow: hidden;
|
||||
background: 0 0;
|
||||
@@ -1926,6 +1926,15 @@ a cite {
|
||||
border-color: #2f363c !important;
|
||||
color: #2f363c !important;
|
||||
}
|
||||
hr.layui-border-black,
|
||||
hr.layui-border-blue,
|
||||
hr.layui-border-cyan,
|
||||
hr.layui-border-green,
|
||||
hr.layui-border-orange,
|
||||
hr.layui-border-purple,
|
||||
hr.layui-border-red {
|
||||
border-width: 0 0 1px;
|
||||
}
|
||||
.layui-timeline-item:before {
|
||||
background-color: #eee;
|
||||
}
|
||||
@@ -2413,6 +2422,9 @@ a cite {
|
||||
.layui-input-wrap .layui-input:focus + .layui-input-split {
|
||||
border-color: #16b777;
|
||||
}
|
||||
.layui-input-wrap .layui-input.layui-form-danger:focus + .layui-input-split {
|
||||
border-color: #ff5722;
|
||||
}
|
||||
.layui-input-wrap .layui-input-prefix.layui-input-split {
|
||||
border-width: 0;
|
||||
border-right-width: 1px;
|
||||
@@ -3803,7 +3815,7 @@ body .layui-table-tips .layui-layer-content {
|
||||
}
|
||||
.layui-menu li {
|
||||
position: relative;
|
||||
margin: 1px 0;
|
||||
margin: 0 0 1px;
|
||||
line-height: 26px;
|
||||
color: rgba(0, 0, 0, 0.8);
|
||||
font-size: 14px;
|
||||
@@ -3871,6 +3883,12 @@ body .layui-table-tips .layui-layer-content {
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
.layui-menu .layui-menu-item-down > .layui-menu-body-title > .layui-icon-down {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
.layui-menu .layui-menu-item-up > .layui-menu-body-title > .layui-icon-up {
|
||||
transform: rotate(-180deg);
|
||||
}
|
||||
.layui-menu .layui-menu-item-down:hover > .layui-menu-body-title > .layui-icon,
|
||||
.layui-menu .layui-menu-item-up > .layui-menu-body-title:hover > .layui-icon {
|
||||
color: #000;
|
||||
@@ -3917,6 +3935,8 @@ body .layui-table-tips .layui-layer-content {
|
||||
margin-top: -6px;
|
||||
line-height: normal;
|
||||
font-size: 14px;
|
||||
transition: all 0.2s;
|
||||
-webkit-transition: all 0.2s;
|
||||
}
|
||||
.layui-menu-body-title > .layui-icon:hover {
|
||||
transition: all 0.3s;
|
||||
@@ -4170,6 +4190,7 @@ body .layui-table-tips .layui-layer-content {
|
||||
z-index: 0;
|
||||
top: 0;
|
||||
border: none;
|
||||
background-color: rgba(0, 0, 0, 0.3);
|
||||
box-shadow: none;
|
||||
}
|
||||
.layui-nav-tree .layui-nav-child dd {
|
||||
@@ -4179,15 +4200,11 @@ body .layui-table-tips .layui-layer-content {
|
||||
color: #fff;
|
||||
color: rgba(255, 255, 255, 0.7);
|
||||
}
|
||||
.layui-nav-tree .layui-nav-child,
|
||||
.layui-nav-tree .layui-nav-child a:hover {
|
||||
background: 0 0;
|
||||
color: #fff;
|
||||
}
|
||||
.layui-nav-itemed > .layui-nav-child {
|
||||
display: block;
|
||||
background-color: rgba(0, 0, 0, 0.3) !important;
|
||||
}
|
||||
.layui-nav-itemed > .layui-nav-child,
|
||||
.layui-nav-itemed > .layui-nav-child > .layui-this > .layui-nav-child {
|
||||
display: block;
|
||||
}
|
||||
@@ -4204,25 +4221,15 @@ body .layui-table-tips .layui-layer-content {
|
||||
color: #373737;
|
||||
color: rgba(0, 0, 0, 0.8);
|
||||
}
|
||||
.layui-nav-tree.layui-bg-gray {
|
||||
padding: 6px 0;
|
||||
}
|
||||
.layui-nav-tree.layui-bg-gray .layui-nav-itemed > a {
|
||||
color: #000 !important;
|
||||
}
|
||||
.layui-nav.layui-bg-gray .layui-this a {
|
||||
color: #16b777;
|
||||
}
|
||||
.layui-nav-tree.layui-bg-gray .layui-nav-itemed > .layui-nav-child {
|
||||
.layui-nav-tree.layui-bg-gray .layui-nav-child {
|
||||
padding-left: 11px;
|
||||
background: 0 0 !important;
|
||||
}
|
||||
.layui-nav-tree.layui-bg-gray .layui-nav-item > a {
|
||||
padding-top: 0;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
.layui-nav-tree.layui-bg-gray .layui-nav-item > a .layui-nav-more {
|
||||
padding: 0;
|
||||
background: 0 0;
|
||||
}
|
||||
.layui-nav-tree.layui-bg-gray .layui-nav-child dd.layui-this,
|
||||
.layui-nav-tree.layui-bg-gray .layui-nav-child dd.layui-this a,
|
||||
@@ -5838,10 +5845,13 @@ html #layuicss-skincodecss {
|
||||
.layui-code-view:hover > .layui-code-fixbar .layui-code-lang-marker {
|
||||
display: none;
|
||||
}
|
||||
.layui-code-theme-dark {
|
||||
border-width: 1px;
|
||||
.layui-code-theme-dark,
|
||||
.layui-code-theme-dark > .layui-code-header {
|
||||
border-color: rgb(126 122 122 / 15%);
|
||||
background-color: #1f1f1f;
|
||||
}
|
||||
.layui-code-theme-dark {
|
||||
border-width: 1px;
|
||||
color: #ccc;
|
||||
}
|
||||
.layui-code-theme-dark > .layui-code-ln-side {
|
||||
@@ -5870,7 +5880,6 @@ html #layuicss-skincodecss {
|
||||
.layui-code-item-preview {
|
||||
position: relative;
|
||||
padding: 16px;
|
||||
overflow: auto;
|
||||
}
|
||||
.layui-code-item-preview > iframe {
|
||||
position: absolute;
|
||||
@@ -5918,6 +5927,9 @@ html #layuicss-skincodecss {
|
||||
height: calc(100vh - 51px) !important;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.layui-code-full .layui-code-item-preview {
|
||||
overflow: auto;
|
||||
}
|
||||
.layui-code-view.layui-code-hl {
|
||||
line-height: 20px !important;
|
||||
border-left-width: 1px;
|
||||
|
||||
+2810
-2664
File diff suppressed because it is too large
Load Diff
@@ -130,6 +130,8 @@ layui.define(
|
||||
|
||||
/**
|
||||
* @since Pear Admin 4.0
|
||||
*
|
||||
* 菜单搜索
|
||||
*/
|
||||
this.menuSearchRender = function (options) {
|
||||
menuSearch.render({
|
||||
@@ -171,6 +173,11 @@ layui.define(
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* @since Pear Admin 4.0
|
||||
*
|
||||
* 消息中心
|
||||
*/
|
||||
this.messageCenterRender = function (options) {
|
||||
messageCenter.render({
|
||||
elem: ".message",
|
||||
@@ -184,6 +191,11 @@ layui.define(
|
||||
$(".layui-logo .title").html(param.logo.title);
|
||||
};
|
||||
|
||||
/**
|
||||
* @since Pear Admin 4.0
|
||||
*
|
||||
* 侧边菜单
|
||||
*/
|
||||
this.menuRender = function (param) {
|
||||
sideMenu = menu.render({
|
||||
elem: "sideMenu",
|
||||
@@ -210,6 +222,11 @@ layui.define(
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* @since Pear Admin 4.0
|
||||
*
|
||||
* 视图容器
|
||||
*/
|
||||
this.bodyRender = function (param) {
|
||||
body.on("click", ".refresh", function () {
|
||||
refresh();
|
||||
@@ -312,6 +329,11 @@ layui.define(
|
||||
document.documentElement.style.setProperty(variableKey, variableVal);
|
||||
};
|
||||
|
||||
/**
|
||||
* @since Pear Admin 4.0
|
||||
*
|
||||
* 主题配置
|
||||
*/
|
||||
this.themeRender = function (option) {
|
||||
if (option.theme.allowCustom === false) {
|
||||
$(".setting").remove();
|
||||
@@ -415,10 +437,10 @@ layui.define(
|
||||
var footerDOM = $(".pear-admin .layui-footer");
|
||||
if (footer === true || footer === "true") {
|
||||
footerDOM.removeClass("close");
|
||||
bodyDOM.css("bottom", footerDOM.outerHeight());
|
||||
bodyDOM.css("height", "calc(100% - 105px)");
|
||||
} else {
|
||||
footerDOM.addClass("close");
|
||||
bodyDOM.css("bottom", "");
|
||||
bodyDOM.css("height", "calc(100% - 60px)");
|
||||
}
|
||||
};
|
||||
|
||||
@@ -466,6 +488,11 @@ layui.define(
|
||||
};
|
||||
})();
|
||||
|
||||
/**
|
||||
* @since Pear Admin 4.0
|
||||
*
|
||||
* 页面刷新
|
||||
*/
|
||||
function refresh() {
|
||||
var refreshA = $(".refresh a");
|
||||
refreshA.removeClass("layui-icon-refresh-1");
|
||||
@@ -488,6 +515,11 @@ layui.define(
|
||||
}, 600);
|
||||
}
|
||||
|
||||
/**
|
||||
* @since Pear Admin 4.0
|
||||
*
|
||||
* 菜单折叠
|
||||
*/
|
||||
function collapse() {
|
||||
sideMenu.collapse();
|
||||
var admin = $(".pear-admin");
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -121,16 +121,17 @@ layui.define(["jquery", "tools"], function (exports) {
|
||||
});
|
||||
|
||||
// 监听键盘事件
|
||||
$(document)
|
||||
$(".menu-search-content")
|
||||
.off("keydown")
|
||||
.keydown(function (e) {
|
||||
if (e.keyCode === 13 || e.keyCode === 32) {
|
||||
e.preventDefault();
|
||||
var id = $(this).attr("smenu-id");
|
||||
var title = $(this).attr("smenu-title");
|
||||
var url = $(this).attr("smenu-url");
|
||||
var type = $(this).attr("smenu-type");
|
||||
var openType = $(this).attr("smenu-open-type");
|
||||
var that = $(".menu-search-list li.this");
|
||||
var id = that.attr("smenu-id");
|
||||
var title = that.attr("smenu-title");
|
||||
var url = that.attr("smenu-url");
|
||||
var type = that.attr("smenu-type");
|
||||
var openType = that.attr("smenu-open-type");
|
||||
|
||||
options.select({ id, title, url, type, openType });
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ layui.define(["jquery", "element", "dropdown"], function (exports) {
|
||||
);
|
||||
|
||||
dropdown.render({
|
||||
elem: `#${option.elem} .layui-icon-down`,
|
||||
elem: `#${option.elem} .layui-tab-control > .layui-icon-down`,
|
||||
trigger: "hover",
|
||||
data: [
|
||||
{
|
||||
@@ -580,7 +580,6 @@ layui.define(["jquery", "element", "dropdown"], function (exports) {
|
||||
*/
|
||||
function createTab(option) {
|
||||
var type = "";
|
||||
var types = option.type + " ";
|
||||
if (option.roll == true) {
|
||||
type = "layui-tab-roll";
|
||||
}
|
||||
@@ -592,7 +591,6 @@ layui.define(["jquery", "element", "dropdown"], function (exports) {
|
||||
}
|
||||
var tab =
|
||||
'<div class="pear-tab-page ' +
|
||||
types +
|
||||
type +
|
||||
' layui-tab" lay-filter="' +
|
||||
option.elem +
|
||||
|
||||
@@ -8,7 +8,7 @@ window.rootPath = (function (src) {
|
||||
layui
|
||||
.config({
|
||||
base: rootPath + "module/",
|
||||
version: "4.0.0-alpha.1",
|
||||
version: "4.0.0",
|
||||
})
|
||||
.extend({
|
||||
admin: "admin",
|
||||
|
||||
Reference in New Issue
Block a user