diff --git a/app/assets/css/tailwind.css b/app/assets/css/tailwind.css index 97444cc..a89fbcf 100644 --- a/app/assets/css/tailwind.css +++ b/app/assets/css/tailwind.css @@ -23,6 +23,11 @@ height: 0; } + html.is-scroll-locked, + html.is-scroll-locked body { + overflow: hidden !important; + } + /* 首页入场动画期间首帧就隐藏滚动条,避免黑色遮罩边缘露出白色滚动槽。 */ html.is-home-intro-active, html.is-home-intro-active body { diff --git a/app/components/common/AppLoader.vue b/app/components/common/AppLoader.vue index 6e4eb69..f4ae5fc 100644 --- a/app/components/common/AppLoader.vue +++ b/app/components/common/AppLoader.vue @@ -9,7 +9,7 @@ const loaderBarRef = ref(null) const appStore = useAppStore() // 加载期间锁定页面滚动(注意:Pinia 的 state 是自动解包的,必须用 computed 包装才能保持响应式) -usePageScrollLock(computed(() => appStore.isAppLoading)) +usePageScrollLock(computed(() => appStore.isAppLoading), { className: 'is-scroll-locked' }) let loaderTween: gsap.core.Tween | null = null let removeLoadListener: (() => void) | null = null @@ -49,7 +49,8 @@ onMounted(() => { gsap.timeline({ onComplete: () => { gsap.set(loaderRef.value, { display: 'none' }) - appStore.setAppLoading(false) // 触发全局状态,通知其他组件入场 + appStore.setAppLoading(false) + window.dispatchEvent(new CustomEvent('app-loading-done')) } }) .to(loaderBarRef.value, { scaleX: 1, duration: 0.25, ease: 'power2.out' }) diff --git a/app/components/layouts/ArcticNewOneHeader.vue b/app/components/layouts/ArcticNewOneHeader.vue index 5e31b4b..46fcbda 100644 --- a/app/components/layouts/ArcticNewOneHeader.vue +++ b/app/components/layouts/ArcticNewOneHeader.vue @@ -19,6 +19,7 @@ const navItems = computed>(() => [ { name: t('nav.studio'), path: '/studio' }, { name: t('nav.work'), path: '/work' }, { name: t('nav.news'), path: '/news' }, + { name: t('nav.tools'), path: '/tools' }, { name: t('nav.contact'), path: '/contact' } ]) @@ -250,9 +251,9 @@ onBeforeUnmount(() => { - +