重排代码格式
parent
32e52b1bbb
commit
a21cd410e2
|
|
@ -40,7 +40,7 @@ layui.define(['table', 'jquery', 'element'], function(exports) {
|
|||
}
|
||||
}
|
||||
|
||||
if(option.data.length > 0){
|
||||
if (option.data.length > 0) {
|
||||
if (option.control != false) {
|
||||
|
||||
createMenuAndControl(option);
|
||||
|
|
@ -83,9 +83,7 @@ layui.define(['table', 'jquery', 'element'], function(exports) {
|
|||
var domss = hash(doms);
|
||||
|
||||
if (domss.text() != '') {
|
||||
|
||||
data['menuPath'] = domss.find("span").text() + " / " + data['menuPath'];
|
||||
|
||||
data['menuPath'] = domss.find("span").text() + " / " + data['menuPath'];
|
||||
}
|
||||
|
||||
var domsss = hash(domss);
|
||||
|
|
@ -95,7 +93,6 @@ layui.define(['table', 'jquery', 'element'], function(exports) {
|
|||
data['menuPath'] = domsss.find("span").text() + " / " + data['menuPath'];
|
||||
|
||||
}
|
||||
|
||||
clickEvent(dom, data);
|
||||
});
|
||||
|
||||
|
|
@ -247,7 +244,7 @@ layui.define(['table', 'jquery', 'element'], function(exports) {
|
|||
'" ' + target + '><i class="' + item.icon + '"></i><span>' + item.title +
|
||||
'</span></a>';
|
||||
} else if (item.type == 1) {
|
||||
|
||||
|
||||
// 创 建 菜 单 结 构
|
||||
content += '<a class="' + className + '" menu-type="' + item.type + '" menu-url="' + item.href + '" menu-id="' +
|
||||
item.id +
|
||||
|
|
@ -457,9 +454,9 @@ layui.define(['table', 'jquery', 'element'], function(exports) {
|
|||
});
|
||||
|
||||
} else {
|
||||
|
||||
|
||||
$(this).parent().addClass("layui-nav-itemed");
|
||||
|
||||
|
||||
ele.animate({
|
||||
height: "0px"
|
||||
}, 200, function() {
|
||||
|
|
@ -489,7 +486,7 @@ layui.define(['table', 'jquery', 'element'], function(exports) {
|
|||
|
||||
var left = $(this).offset().left + 132;
|
||||
|
||||
$(this).children(".layui-nav-child").offset({
|
||||
$(this).children(".layui-nav-child").offset({
|
||||
left: left
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,19 @@
|
|||
window.rootPath = (function (src) {
|
||||
src = document.scripts[document.scripts.length - 1].src;
|
||||
return src.substring(0, src.lastIndexOf("/") + 1);
|
||||
window.rootPath = (function(src) {
|
||||
src = document.scripts[document.scripts.length - 1].src;
|
||||
return src.substring(0, src.lastIndexOf("/") + 1);
|
||||
})();
|
||||
|
||||
layui.config({
|
||||
base: rootPath + "module/",
|
||||
version: true
|
||||
base: rootPath + "module/",
|
||||
version: true
|
||||
}).extend({
|
||||
admin: "admin",
|
||||
menu:"menu"
|
||||
});
|
||||
admin: "admin",
|
||||
menu: "menu",
|
||||
frame: "frame",
|
||||
tab: "tab",
|
||||
echarts: "echarts",
|
||||
echartsTheme: "echartsTheme",
|
||||
hash: "hash",
|
||||
document: "document",
|
||||
select: "select"
|
||||
});
|
||||
|
|
|
|||
18
login.html
18
login.html
|
|
@ -6,8 +6,8 @@
|
|||
<link rel="stylesheet" href="component/pear/css/pear.css" />
|
||||
<link rel="stylesheet" href="assets/login.css" />
|
||||
</head>
|
||||
<body background="admin/images/background.svg" >
|
||||
<form class="layui-form" action="javascript:void(0);">
|
||||
<body background="admin/images/background.svg">
|
||||
<form class="layui-form" action="javascript:void(0);">
|
||||
<div class="layui-form-item">
|
||||
<img class="logo" src="admin/images/logo.png" />
|
||||
<div class="title">Pear Admin</div>
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
明 湖 区 最 具 影 响 力 的 设 计 规 范 之 一
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-form-item">
|
||||
<input placeholder="账 户 : " hover class="layui-input" />
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
|
|
@ -24,21 +24,21 @@
|
|||
<div class="layui-form-item">
|
||||
<input type="checkbox" name="" title="记住密码" lay-skin="primary" checked>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-form-item">
|
||||
<button style="background-color: #5FB878!important;" class="pear-btn pear-btn-primary login">
|
||||
登 入
|
||||
登 入
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
<script src="component/layui/layui.js"></script>
|
||||
<script>
|
||||
layui.use(['form', 'element','jquery'], function() {
|
||||
layui.use(['form', 'element', 'jquery'], function() {
|
||||
var form = layui.form;
|
||||
var element = layui.element;
|
||||
var $ = layui.jquery;
|
||||
|
||||
$("body").on("click",".login",function(){
|
||||
location.href="index.html"
|
||||
|
||||
$("body").on("click", ".login", function() {
|
||||
location.href = "index.html"
|
||||
})
|
||||
})
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Reference in New Issue