26 lines
792 B
Vue
26 lines
792 B
Vue
<script setup lang="ts">
|
|
import { usePageDataStore } from '#layers/stores/usePageDataStore'
|
|
import type { PageDataValue } from '#layers/types/api/pageData'
|
|
|
|
const currentLayout = ref<'default' | 'promotion' | null>('default')
|
|
const currentPageData = ref<PageDataValue | null>(null)
|
|
|
|
onMounted(() => {
|
|
const pageDataStore = usePageDataStore()
|
|
const { pageData, pageLayoutType } = storeToRefs(pageDataStore)
|
|
currentPageData.value = pageData.value
|
|
currentLayout.value = pageLayoutType.value
|
|
})
|
|
|
|
definePageMeta({
|
|
layout: false, // 동적 레이아웃을 위해 기본 레이아웃 비활성화
|
|
middleware: ['inspection'],
|
|
})
|
|
</script>
|
|
|
|
<template>
|
|
<NuxtLayout :name="currentLayout">
|
|
<LayoutsMain v-if="currentPageData" :page-data="currentPageData" />
|
|
</NuxtLayout>
|
|
</template>
|