mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-11-10 04:50:50 +08:00
优化更多按钮空态隐藏下拉箭头与面板左上角定位
This commit is contained in:
@@ -975,6 +975,11 @@
|
|||||||
display: none !important;
|
display: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 空态同时隐藏下拉箭头图标(图标为绝对定位,隐藏不影响按钮宽度与折叠测量;空态类由 relayoutHeaderMenu 维护) */
|
||||||
|
.layuimini-header-more.layuimini-header-more-empty .layui-nav-more {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
.layuimini-header-more .layui-nav-child {
|
.layuimini-header-more .layui-nav-child {
|
||||||
max-height: 60vh;
|
max-height: 60vh;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
@@ -983,6 +988,7 @@
|
|||||||
|
|
||||||
.layuimini-module-panel {
|
.layuimini-module-panel {
|
||||||
padding : 20px;
|
padding : 20px;
|
||||||
|
min-height : 300px;
|
||||||
max-height : 70vh;
|
max-height : 70vh;
|
||||||
overflow-y : auto;
|
overflow-y : auto;
|
||||||
background : #fff;
|
background : #fff;
|
||||||
|
|||||||
@@ -296,6 +296,8 @@
|
|||||||
ddHtml += '<dd lay-unselect data-menu="' + menuId + '"><a href="javascript:;"><i class="' + icon + '"></i> ' + (menu.title || '') + '</a></dd>';
|
ddHtml += '<dd lay-unselect data-menu="' + menuId + '"><a href="javascript:;"><i class="' + icon + '"></i> ' + (menu.title || '') + '</a></dd>';
|
||||||
});
|
});
|
||||||
$more.children('dl.layui-nav-child').html(ddHtml);
|
$more.children('dl.layui-nav-child').html(ddHtml);
|
||||||
|
// 空态标记:无折叠模块时隐藏下拉箭头图标(配合 CSS;箭头为绝对定位不影响宽度测量)
|
||||||
|
$more.toggleClass('layuimini-header-more-empty', hiddenMenus.length === 0);
|
||||||
element.init(); //已核实安全:只重绑事件与 bar span,不重建 dd DOM,激活态得以保留
|
element.init(); //已核实安全:只重绑事件与 bar span,不重建 dd DOM,激活态得以保留
|
||||||
miniMenu.syncHeaderActiveState(); //折叠可能隐藏当前激活项,重算后立即同步
|
miniMenu.syncHeaderActiveState(); //折叠可能隐藏当前激活项,重算后立即同步
|
||||||
},
|
},
|
||||||
@@ -357,8 +359,8 @@
|
|||||||
type: 1,
|
type: 1,
|
||||||
title: '全部模块',
|
title: '全部模块',
|
||||||
anim: 2,
|
anim: 2,
|
||||||
offset: 't',
|
offset: 'lt', //左上角定位
|
||||||
area: ['100%', 'auto'],
|
area: ['60%', 'auto'], //宽度 60%,高度随内容(面板内容最小高 300px、上限 70vh 滚动由 CSS 控制)
|
||||||
shade: 0.2,
|
shade: 0.2,
|
||||||
shadeClose: true,
|
shadeClose: true,
|
||||||
closeBtn: 0,
|
closeBtn: 0,
|
||||||
|
|||||||
Reference in New Issue
Block a user