From 517135bb498c336e3aa3a137557690c5d21b0c6e Mon Sep 17 00:00:00 2001 From: clkim Date: Tue, 9 Dec 2025 12:46:22 +0900 Subject: [PATCH] =?UTF-8?q?fix.=20gnb=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/app.vue | 2 +- layers/components/layouts/Header.vue | 33 ++++++++++++++-------------- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/app/app.vue b/app/app.vue index f7dbc72..e218623 100644 --- a/app/app.vue +++ b/app/app.vue @@ -85,7 +85,7 @@ const setupAllMetaData = (data: GameDataValue) => { htmlAttrs: { 'data-game': data.game_name || '', 'data-theme': theme, - lang: locale.value, + lang: locale.value ?? data.default_lang_code, }, link: faviconLinks, style: [ diff --git a/layers/components/layouts/Header.vue b/layers/components/layouts/Header.vue index 31ad6d6..b067448 100644 --- a/layers/components/layouts/Header.vue +++ b/layers/components/layouts/Header.vue @@ -15,7 +15,7 @@ const PLATFORM_LABEL_KEY: Record = { pc: 'PC', google_play: 'Google Play', app_store: 'App Store', -} +} as const const route = useRoute() const { tm } = useI18n() @@ -40,7 +40,7 @@ const isMounted = ref(false) const isMenuOpen = ref(false) const navWidth = ref(0) const officialItemWidths = ref([]) -const overflowNam = ref(0) +const overflowCount = ref(0) const gnbData = computed(() => gameData.value?.gnb) const hasGnbMenus = computed(() => { @@ -107,7 +107,7 @@ const calculateOverflow = () => { if (!navAreaRef.value || !startRef.value) return if (breakpoints.value.isMobile) { - overflowNam.value = 0 + overflowCount.value = 0 return } @@ -128,16 +128,14 @@ const calculateOverflow = () => { } } - overflowNam.value = removedCount + overflowCount.value = removedCount } else { - overflowNam.value = 0 + overflowCount.value = 0 } } // 100ms마다 최대 1회 실행 -const throttledCalculateOverflow = useThrottleFn(() => { - calculateOverflow() -}, 100) +const throttledCalculateOverflow = useThrottleFn(calculateOverflow, 100) const handleMenuOpen = () => { isMenuOpen.value = true @@ -195,7 +193,8 @@ const handleStartClick = () => { : null if (!target || !supportedPlatforms.value.includes(target)) { - return showNotSupportedOSAlert() + showNotSupportedOSAlert() + return } const url = gameData.value?.market_json?.[target]?.url || '' @@ -205,7 +204,7 @@ const handleStartClick = () => { } onMounted(() => { - overflowNam.value = 0 + overflowCount.value = 0 isMounted.value = true // 초기 계산 @@ -269,9 +268,9 @@ onMounted(() => { :class="{ 'is-hidden': breakpoints.isDesktop && - overflowNam > 0 && + overflowCount > 0 && Number(key) >= - Object.keys(gnbData?.menus).length - overflowNam, + Object.keys(gnbData?.menus).length - overflowCount, }" > { -
+