diff --git a/app/composables/usePageScrollLock.ts b/app/composables/usePageScrollLock.ts index 2b5dea2..6d79dfe 100644 --- a/app/composables/usePageScrollLock.ts +++ b/app/composables/usePageScrollLock.ts @@ -1,6 +1,5 @@ import { onBeforeUnmount, watch, type Ref, isRef, unref, computed } from 'vue' import { useNuxtApp, useHead } from '#imports' -import type Lenis from 'lenis' // 全局模块级变量,用于记录锁定请求的次数,解决多组件并发锁定的竞态问题 let lenisLockCount = 0 @@ -13,8 +12,9 @@ export const usePageScrollLock = (isLocked: Ref | boolean) => { // SSR 和 CSR 都支持:自动将 class 注入到 HTML 标签上 useHead({ htmlAttrs: { - class: computed(() => unref(isLocked) ? 'is-home-intro-active' : '') - } + class: computed(() => unref(isLocked) ? 'is-home-intro-active' : ''), + lang: 'zh-CN', + }, }) let currentlyLocked = false