fix. page 레이아웃 수정
This commit is contained in:
@@ -1,19 +1,17 @@
|
||||
<script setup lang="ts">
|
||||
import { usePageDataStore } from '#layers/stores/usePageDataStore'
|
||||
import { getLayoutType } from '#layers/utils/dataUtil'
|
||||
import type { PageDataValue } from '#layers/types/api/pageData'
|
||||
|
||||
const getPageData = ref<PageDataValue | null>(null)
|
||||
const currentPageData = ref<PageDataValue | null>(null)
|
||||
const currentLayout = ref<'default' | 'promotion' | null>(null)
|
||||
|
||||
onMounted(() => {
|
||||
const pageDataStore = usePageDataStore()
|
||||
const { pageData } = storeToRefs(pageDataStore)
|
||||
getPageData.value = pageData.value
|
||||
const { pageData, pageLayoutType } = storeToRefs(pageDataStore)
|
||||
currentPageData.value = pageData.value
|
||||
currentLayout.value = pageLayoutType.value
|
||||
})
|
||||
|
||||
const currentLayout = computed(() => getLayoutType(getPageData.value))
|
||||
|
||||
|
||||
definePageMeta({
|
||||
layout: false, // 동적 레이아웃을 위해 기본 레이아웃 비활성화
|
||||
middleware: ['inspection'],
|
||||
@@ -22,6 +20,6 @@ definePageMeta({
|
||||
|
||||
<template>
|
||||
<NuxtLayout :name="currentLayout">
|
||||
<LayoutsMain v-if="getPageData" :page-data="getPageData" />
|
||||
<LayoutsMain v-if="currentPageData" :page-data="currentPageData" />
|
||||
</NuxtLayout>
|
||||
</template>
|
||||
|
||||
@@ -1,19 +1,17 @@
|
||||
<script setup lang="ts">
|
||||
import { usePageDataStore } from '#layers/stores/usePageDataStore'
|
||||
import { getLayoutType } from '#layers/utils/dataUtil'
|
||||
import type { PageDataValue } from '#layers/types/api/pageData'
|
||||
|
||||
const getPageData = ref<PageDataValue | null>(null)
|
||||
const currentPageData = ref<PageDataValue | null>(null)
|
||||
const currentLayout = ref<'default' | 'promotion' | null>(null)
|
||||
|
||||
onMounted(() => {
|
||||
const pageDataStore = usePageDataStore()
|
||||
const { pageData } = storeToRefs(pageDataStore)
|
||||
getPageData.value = pageData.value
|
||||
const { pageData, pageLayoutType } = storeToRefs(pageDataStore)
|
||||
currentPageData.value = pageData.value
|
||||
currentLayout.value = pageLayoutType.value
|
||||
})
|
||||
|
||||
const currentLayout = computed(() => getLayoutType(getPageData.value))
|
||||
|
||||
|
||||
definePageMeta({
|
||||
layout: false, // 동적 레이아웃을 위해 기본 레이아웃 비활성화
|
||||
middleware: ['inspection'],
|
||||
@@ -22,6 +20,6 @@ definePageMeta({
|
||||
|
||||
<template>
|
||||
<NuxtLayout :name="currentLayout">
|
||||
<LayoutsMain v-if="getPageData" :page-data="getPageData" />
|
||||
<LayoutsMain v-if="currentPageData" :page-data="currentPageData" />
|
||||
</NuxtLayout>
|
||||
</template>
|
||||
|
||||
@@ -1,18 +1,17 @@
|
||||
<script setup lang="ts">
|
||||
import { usePageDataStore } from '#layers/stores/usePageDataStore'
|
||||
import { getLayoutType } from '#layers/utils/dataUtil'
|
||||
import type { PageDataValue } from '#layers/types/api/pageData'
|
||||
|
||||
const getPageData = ref<PageDataValue | null>(null)
|
||||
const currentPageData = ref<PageDataValue | null>(null)
|
||||
const currentLayout = ref<'default' | 'promotion' | null>(null)
|
||||
|
||||
onMounted(() => {
|
||||
const pageDataStore = usePageDataStore()
|
||||
const { pageData } = storeToRefs(pageDataStore)
|
||||
getPageData.value = pageData.value
|
||||
const { pageData, pageLayoutType } = storeToRefs(pageDataStore)
|
||||
currentPageData.value = pageData.value
|
||||
currentLayout.value = pageLayoutType.value
|
||||
})
|
||||
|
||||
const currentLayout = computed(() => getLayoutType(getPageData.value))
|
||||
|
||||
definePageMeta({
|
||||
layout: false, // 동적 레이아웃을 위해 기본 레이아웃 비활성화
|
||||
middleware: ['inspection'],
|
||||
@@ -21,6 +20,6 @@ definePageMeta({
|
||||
|
||||
<template>
|
||||
<NuxtLayout :name="currentLayout">
|
||||
<LayoutsMain v-if="getPageData" :page-data="getPageData" />
|
||||
<LayoutsMain v-if="currentPageData" :page-data="currentPageData" />
|
||||
</NuxtLayout>
|
||||
</template>
|
||||
|
||||
@@ -1,19 +1,17 @@
|
||||
<script setup lang="ts">
|
||||
import { usePageDataStore } from '#layers/stores/usePageDataStore'
|
||||
import { getLayoutType } from '#layers/utils/dataUtil'
|
||||
import type { PageDataValue } from '#layers/types/api/pageData'
|
||||
|
||||
const getPageData = ref<PageDataValue | null>(null)
|
||||
const currentPageData = ref<PageDataValue | null>(null)
|
||||
const currentLayout = ref<'default' | 'promotion' | null>(null)
|
||||
|
||||
onMounted(() => {
|
||||
const pageDataStore = usePageDataStore()
|
||||
const { pageData } = storeToRefs(pageDataStore)
|
||||
getPageData.value = pageData.value
|
||||
const { pageData, pageLayoutType } = storeToRefs(pageDataStore)
|
||||
currentPageData.value = pageData.value
|
||||
currentLayout.value = pageLayoutType.value
|
||||
})
|
||||
|
||||
const currentLayout = computed(() => getLayoutType(getPageData.value))
|
||||
|
||||
|
||||
definePageMeta({
|
||||
layout: false, // 동적 레이아웃을 위해 기본 레이아웃 비활성화
|
||||
middleware: ['inspection'],
|
||||
@@ -22,6 +20,6 @@ definePageMeta({
|
||||
|
||||
<template>
|
||||
<NuxtLayout :name="currentLayout">
|
||||
<LayoutsMain v-if="getPageData" :page-data="getPageData" />
|
||||
<LayoutsMain v-if="currentPageData" :page-data="currentPageData" />
|
||||
</NuxtLayout>
|
||||
</template>
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { getComponentGroup, getComponentGroupAry } from '#layers/utils/dataUtil'
|
||||
import type { TrackingObject } from '#layers/types/api/common'
|
||||
import type { PageDataTemplateComponents } from '#layers/types/api/pageData'
|
||||
import type { Platform } from '#layers/types/components/button'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user