优化移动端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

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