fix. gnb 2depth 정확히 일치하는 경우만 1depth 활성화 되도록 수정

This commit is contained in:
clkim
2025-11-19 16:13:02 +09:00
parent dc3d0083fc
commit 1596f874ff
2 changed files with 55 additions and 52 deletions

View File

@@ -10,6 +10,11 @@ import type {
const MORE_WIDTH = 72
const START_WIDTH_MARGIN = 40
const PLATFORM_LABEL_KEY: Record<PlatformTransformType, string> = {
pc: 'PC',
google_play: 'Google Play',
app_store: 'App Store',
}
const route = useRoute()
const { tm } = useI18n()
@@ -26,12 +31,12 @@ const { isPassedStoveGnb } = storeToRefs(scrollStore)
const navAreaRef = ref<HTMLElement | null>(null)
const startRef = ref<HTMLElement | null>(null)
const { width: startWidth } = useElementSize(startRef)
const isMenuOpen = ref(false)
const navWidth = ref(0)
const officialItemWidths = ref<number[]>([])
const overflowNam = ref<number>(0)
// const { width: navWidth } = useElementSize(navAreaRef)
const { width: startWidth } = useElementSize(startRef)
const gnbData = computed(() => gameData.value?.gnb)
const gnb1depthButtonData = computed(
@@ -50,7 +55,7 @@ const supportedPlatforms = computed(
const pathMatches = (base: string, current: string) => {
if (!base || base === '/') return current === '/'
return current === base || current.startsWith(base + '/')
return current === base
}
/** 자식 중 활성 링크 존재 여부 */
@@ -151,12 +156,6 @@ const has2depthButton = (gnbItem: GameDataMenu) => {
const highlight = (text: string) => `<span class="highlight">${text}</span>`
const PLATFORM_LABEL_KEY: Record<PlatformTransformType, string> = {
pc: 'PC',
google_play: 'Google Play',
app_store: 'App Store',
}
const tmWithGameName = (key: string): string => {
const raw = tm(key)
if (typeof raw !== 'string') return ''
@@ -458,7 +457,7 @@ onMounted(() => {
.nav-area {
@apply flex flex-col w-[100vw] max-w-[360px] min-w-[320px] bg-theme-foreground-10 translate-x-[-100%]
md:inline-flex md:flex-row md:w-auto md:max-w-none md:h-full md:pl-[40px] md:items-center md:bg-transparent md:transform-none;
md:inline-flex md:flex-row md:w-auto md:max-w-[100%] md:h-full md:pl-[40px] md:items-center md:bg-transparent md:transform-none;
}
.nav-logo {
@@ -467,7 +466,7 @@ onMounted(() => {
.nav-list {
@apply overflow-hidden flex flex-col order-1 h-full mt-2 mb-4 px-2
md:flex-row md:order-none md:h-full md:my-0 md:ml-10 md:mr-6 md:px-0 md:overflow-visible;
md:flex-row md:order-none md:h-full md:my-0 md:ml-10 md:mr-6 md:px-0;
}
.nav-item {
@@ -513,7 +512,7 @@ onMounted(() => {
}
.official {
@apply overflow-x-hidden overflow-y-auto pb-2 md:flex md:items-center md:space-x-8 md:pb-0 md:overflow-visible;
@apply overflow-x-hidden overflow-y-auto pb-2 md:flex md:items-center md:space-x-8 md:pb-0;
}
.custom-theme-scrollbar::-webkit-scrollbar {
@apply w-1;