新增 collaspe 配置,支持默认侧边收缩
parent
3944dda581
commit
5501cc8dc1
|
|
@ -195,6 +195,14 @@ layui.define(['message', 'table', 'jquery', 'element', 'yaml', 'form', 'tab', 'm
|
||||||
$(".loader-main").fadeOut(200);
|
$(".loader-main").fadeOut(200);
|
||||||
}, param.other.keepLoad)
|
}, param.other.keepLoad)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.collaspe = function(param) {
|
||||||
|
if(param.menu.collaspe) {
|
||||||
|
if ($(window).width() >= 768) {
|
||||||
|
collaspe()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
this.themeRender = function(option) {
|
this.themeRender = function(option) {
|
||||||
if (option.theme.allowCustom === false) {
|
if (option.theme.allowCustom === false) {
|
||||||
|
|
@ -427,6 +435,7 @@ layui.define(['message', 'table', 'jquery', 'element', 'yaml', 'form', 'tab', 'm
|
||||||
pearAdmin.bodyRender(param);
|
pearAdmin.bodyRender(param);
|
||||||
pearAdmin.themeRender(param);
|
pearAdmin.themeRender(param);
|
||||||
pearAdmin.keepLoad(param);
|
pearAdmin.keepLoad(param);
|
||||||
|
pearAdmin.collaspe(param)
|
||||||
if (param.header.message != false) {
|
if (param.header.message != false) {
|
||||||
pearAdmin.messageRender(param);
|
pearAdmin.messageRender(param);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@
|
||||||
},
|
},
|
||||||
"menu": {
|
"menu": {
|
||||||
"data": "admin/data/menu.json",
|
"data": "admin/data/menu.json",
|
||||||
|
"collaspe": true,
|
||||||
"accordion": true,
|
"accordion": true,
|
||||||
"method": "GET",
|
"method": "GET",
|
||||||
"control": false,
|
"control": false,
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,8 @@ menu:
|
||||||
method: "GET"
|
method: "GET"
|
||||||
## 是否同时只打开一个菜单目录
|
## 是否同时只打开一个菜单目录
|
||||||
accordion: true
|
accordion: true
|
||||||
|
## 侧边默认折叠状态
|
||||||
|
collaspe: false
|
||||||
## 是否开启多系统菜单模式
|
## 是否开启多系统菜单模式
|
||||||
control: false
|
control: false
|
||||||
## 默认选中的菜单项
|
## 默认选中的菜单项
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue