fix: 侧边栏子菜单默认收起状态

- 删除了自动展开当前活动页面子菜单的代码
- 当用户首次访问网站时,所有子菜单现在默认保持收起状态
This commit is contained in:
Zuoling Rong
2025-05-04 01:53:29 +08:00
parent 71815c9cfb
commit e055ea26e5

View File

@@ -613,7 +613,6 @@ document.addEventListener('DOMContentLoaded', () => {
if (activeNavItem) { if (activeNavItem) {
const activeWrapper = activeNavItem.closest('.nav-item-wrapper'); const activeWrapper = activeNavItem.closest('.nav-item-wrapper');
if (activeWrapper) { if (activeWrapper) {
activeWrapper.classList.add('expanded');
} }
} }