feat. 데이터 구조 변경에 따른 수정
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import { storeToRefs } from "pinia";
|
||||
import { usePageDataStore } from "#layers/stores/usePageDataStore";
|
||||
import Section from "#layers/components/molecules/Section.vue";
|
||||
import Template from "#layers/components/molecules/Template.vue";
|
||||
|
||||
const pageDataStore = usePageDataStore();
|
||||
const { pageData } = storeToRefs(pageDataStore);
|
||||
@@ -34,7 +34,7 @@ watchEffect(() => {
|
||||
<template>
|
||||
<NuxtLayout :name="layout">
|
||||
<ClientOnly>
|
||||
<Section :templates="pageData?.templates ?? []" />
|
||||
<Template :templates="pageData?.templates ?? []" />
|
||||
</ClientOnly>
|
||||
</NuxtLayout>
|
||||
</template>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import { storeToRefs } from "pinia";
|
||||
import { usePageDataStore } from "#layers/stores/usePageDataStore";
|
||||
import Section from "#layers/components/molecules/Section.vue";
|
||||
import Template from "#layers/components/molecules/Template.vue";
|
||||
|
||||
const pageDataStore = usePageDataStore();
|
||||
const { pageData } = storeToRefs(pageDataStore);
|
||||
@@ -34,7 +34,7 @@ watchEffect(() => {
|
||||
<template>
|
||||
<NuxtLayout :name="layout">
|
||||
<ClientOnly>
|
||||
<Section :templates="pageData?.templates ?? []" />
|
||||
<Template :templates="pageData?.templates ?? []" />
|
||||
</ClientOnly>
|
||||
</NuxtLayout>
|
||||
</template>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import { storeToRefs } from "pinia";
|
||||
import { usePageDataStore } from "#layers/stores/usePageDataStore";
|
||||
import Section from "#layers/components/molecules/Section.vue";
|
||||
import Template from "#layers/components/molecules/Template.vue";
|
||||
|
||||
const pageDataStore = usePageDataStore();
|
||||
const { pageData } = storeToRefs(pageDataStore);
|
||||
@@ -9,6 +9,11 @@ const { pageData } = storeToRefs(pageDataStore);
|
||||
// const layout = pageData.value?.meta?.layout ?? "default";
|
||||
const layout = "default"; // 기본 레이아웃 사용
|
||||
|
||||
// definePageMeta를 사용하여 레이아웃을 미리 설정
|
||||
definePageMeta({
|
||||
layout: false, // 기본 레이아웃 비활성화
|
||||
});
|
||||
|
||||
// definePageMeta를 사용하여 레이아웃을 미리 설정
|
||||
watchEffect(() => {
|
||||
if (pageData.value?.meta_tag) {
|
||||
@@ -29,7 +34,7 @@ watchEffect(() => {
|
||||
<template>
|
||||
<NuxtLayout :name="layout">
|
||||
<ClientOnly>
|
||||
<Section :templates="pageData?.templates ?? []" />
|
||||
<Template :templates="pageData?.templates ?? []" />
|
||||
</ClientOnly>
|
||||
</NuxtLayout>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user