mirror of
https://github.com/dqjdda/Aurora.git
synced 2018-11-06 05:33:29 +00:00
修复设置主题,刷新后失效的bug,修复主题失效的bug
This commit is contained in:
@@ -159,12 +159,17 @@
|
||||
*/
|
||||
var themeKey = 'KITADMIN_SETTING_THEME';
|
||||
var theme = localStorage.getItem(themeKey);
|
||||
var themeName = $.parseJSON(theme).theme;
|
||||
$("input[name='setting-theme']").each(function () {
|
||||
if($(this).parent().attr("data-theme") == themeName){
|
||||
$(this).attr("checked","checked");
|
||||
}
|
||||
})
|
||||
|
||||
if(theme == null){
|
||||
$("input[name='setting-theme']")[0].attr("checked","checked");
|
||||
} else {
|
||||
var themeName = $.parseJSON(theme).theme;
|
||||
$("input[name='setting-theme']").each(function () {
|
||||
if($(this).parent().attr("data-theme") == themeName){
|
||||
$(this).attr("checked","checked");
|
||||
}
|
||||
})
|
||||
}
|
||||
layui.use(['form', 'utils'], function () {
|
||||
var form = layui.form,
|
||||
$ = layui.jquery,
|
||||
|
||||
Reference in New Issue
Block a user