Skip to content

Commit c159d93

Browse files
committed
improve behavior
1 parent dfe8d27 commit c159d93

File tree

1 file changed

+5
-2
lines changed
  • packages/frontendmu-nuxt/components/site

1 file changed

+5
-2
lines changed

packages/frontendmu-nuxt/components/site/Menu.vue

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,15 @@ function toggleHeader() {
113113
headerHeight
114114
);
115115
116-
if (nextTransition !== currentTransition) {
116+
if (
117+
currentScrollPosition >= headerHeight &&
118+
nextTransition !== currentTransition
119+
) {
117120
currentTransition = nextTransition;
118121
$header.style.transform = `translateY(-${currentTransition}px)`;
119122
}
120123
121-
if (currentScrollPosition > 60) {
124+
if (currentScrollPosition > headerHeight) {
122125
$header.classList.add(
123126
"intersect",
124127
"shadow-sm",

0 commit comments

Comments
 (0)