diff --git a/common/common.js b/common/common.js index bc7e592..140b743 100644 --- a/common/common.js +++ b/common/common.js @@ -222,6 +222,20 @@ $(function () { } ); + // 当鼠标离开整个导航区域(包括下拉面板)时收起 + $(".nav-shadow").on("mouseleave", function () { + if (hoverTimer) { + clearTimeout(hoverTimer); + hoverTimer = null; + } + leaveTimer = setTimeout(() => { + $(".nav-cont").css("height", "0"); + setTimeout(() => { + $(".nav-cont .nav-cont-menu").css("display", "none"); + }, 300); + }, 100); + }); + if (localStorage.jwt) { if (sessionStorage.accountInfo) { const obj = JSON.parse(sessionStorage.accountInfo);