整理代码

develop
就眠仪式 2020-09-04 18:59:32 +08:00
parent 0c2a9ab424
commit cfe3b03b23
3 changed files with 7 additions and 7 deletions

View File

@ -142,11 +142,12 @@ layui.define(['table', 'jquery', 'element', 'form', 'tab', 'menu', 'frame'],
}
var colorId = localStorage.getItem("theme-color");
var menu = localStorage.getItem("theme-menu");
console.log("主题标识:"+colorId);
console.log("菜单主题:"+menu);
var color = getColorById(colorId);
if (menu == "null") {
menu = option.theme.defaultMenu;
} else {
if (option.theme.allowCustom == false) {
menu = option.theme.defaultMenu;
}
@ -209,9 +210,6 @@ layui.define(['table', 'jquery', 'element', 'form', 'tab', 'menu', 'frame'],
if ($("iframe").contents().find("#customTheme").length > 0) {
$("iframe").contents().find("#customTheme").remove();
}
/* var theme = "<style>";
theme += '</style>';
$("iframe").contents().find("head").append(theme); */
$("#pearadmin-bg-color").html(style);
}
};

View File

@ -20,8 +20,8 @@
}
},
"theme": {
"defaultColor": "2",
"defaultMenu": "dark-theme",
"defaultColor": "3",
"defaultMenu": "light-theme",
"allowCustom": true
},
"colors": [{

View File

@ -227,7 +227,9 @@
</div>
</div>
<div class="layui-card">
<div class="layui-card-header"></div>
<div class="layui-card-header">
链接
</div>
<div class="layui-card-body">
<a target="_blank" href="http://www.pearadmin.com" class="pear-btn pear-btn-success layui-btn-fluid" style="height: 50px;line-height: 50px;">官 网</a>
<br/>