重排代码格式

develop
就眠仪式 2020-07-16 13:15:49 +08:00
parent 32e52b1bbb
commit a21cd410e2
3 changed files with 30 additions and 26 deletions

View File

@ -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'];
}
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);
});

View File

@ -1,4 +1,4 @@
window.rootPath = (function (src) {
window.rootPath = (function(src) {
src = document.scripts[document.scripts.length - 1].src;
return src.substring(0, src.lastIndexOf("/") + 1);
})();
@ -8,5 +8,12 @@ layui.config({
version: true
}).extend({
admin: "admin",
menu:"menu"
menu: "menu",
frame: "frame",
tab: "tab",
echarts: "echarts",
echartsTheme: "echartsTheme",
hash: "hash",
document: "document",
select: "select"
});

View File

@ -6,7 +6,7 @@
<link rel="stylesheet" href="component/pear/css/pear.css" />
<link rel="stylesheet" href="assets/login.css" />
</head>
<body background="admin/images/background.svg" >
<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" />
@ -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>