重排代码格式
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);
|
||||
});
|
||||
|
||||
|
|
@ -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"
|
||||
});
|
||||
14
login.html
14
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,7 +24,7 @@
|
|||
<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>
|
||||
|
|
@ -32,13 +32,13 @@
|
|||
</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