优化移动端UI布局和逻辑

This commit is contained in:
Zuoling Rong
2025-05-03 02:36:33 +08:00
parent 8b4ba40193
commit 12a18e4e66
2 changed files with 9 additions and 2 deletions

View File

@@ -570,6 +570,11 @@ document.addEventListener('DOMContentLoaded', () => {
const pageId = item.getAttribute('data-page');
if (pageId) {
showPage(pageId);
// 在移动端视图下点击导航项后自动收起侧边栏
if (isMobile() && isSidebarOpen) {
closeAllPanels();
}
}
});
});