优化移动端ui逻辑

This commit is contained in:
Zuoling Rong
2025-05-03 15:39:59 +08:00
parent e97fb43159
commit 18ae9071ad
2 changed files with 4 additions and 3 deletions

View File

@@ -237,7 +237,6 @@ body.loaded .layout {
visibility: hidden; visibility: hidden;
transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1); transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
z-index: 950; /* 调整遮罩层z-index处于按钮与弹出面板之间 */ z-index: 950; /* 调整遮罩层z-index处于按钮与弹出面板之间 */
backdrop-filter: blur(4px);
} }
.overlay.active { .overlay.active {
@@ -966,7 +965,6 @@ body .content.expanded {
justify-content: center; justify-content: center;
align-items: center; align-items: center;
z-index: 1000; z-index: 1000;
backdrop-filter: blur(4px);
} }
.modal.active { .modal.active {
@@ -1183,7 +1181,6 @@ body .content.expanded {
left: 0; left: 0;
width: 100%; width: 100%;
padding: 1rem; padding: 1rem;
background-color: var(--bg-color);
transform: translateY(-100%); transform: translateY(-100%);
transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
z-index: 95; z-index: 95;

View File

@@ -562,6 +562,10 @@ document.addEventListener('DOMContentLoaded', () => {
resetSearch(); resetSearch();
} else if (e.key === 'Enter') { } else if (e.key === 'Enter') {
performSearch(searchInput.value); performSearch(searchInput.value);
// 在移动设备上,执行搜索后自动关闭搜索面板
if (isMobile() && isSearchOpen) {
closeAllPanels();
}
} }
}); });