feat 綜藝出演總表頁

This commit is contained in:
2026-05-17 02:34:42 +08:00
parent c291dc5970
commit 3b9ae7b9dc
5 changed files with 338 additions and 2 deletions
+12
View File
@@ -451,10 +451,22 @@
event.preventDefault();
event.stopPropagation();
if (!isSoon && !item.classList.contains("coming-soon")) {
const menuList = nav.querySelector(":scope > ul");
const prevScroll = menuList ? menuList.scrollTop : 0;
items.forEach((other) => {
if (other !== item) other.classList.remove("open");
});
item.classList.toggle("open");
if (!item.classList.contains("open")) {
item.querySelectorAll(".portal-nav__subgroup.open").forEach((sub) => {
sub.classList.remove("open");
});
}
if (menuList) {
requestAnimationFrame(() => {
menuList.scrollTop = prevScroll;
});
}
}
return;
}