레이아웃 필요없는 경우(login) 등을 위해 코드 추가

This commit is contained in:
yoon 2025-01-07 15:30:31 +09:00
parent d56f375767
commit b7b9fca3dd

View File

@ -1,12 +1,19 @@
<template> <template>
<normal-layout> <component :is="layout">
<template #content> <template #content>
<router-view></router-view> <router-view></router-view>
</template> </template>
</normal-layout> </component>
</template> </template>
<script setup> <script setup>
import { computed } from 'vue';
import { useRoute } from 'vue-router';
import NormalLayout from './layouts/NormalLayout.vue'; import NormalLayout from './layouts/NormalLayout.vue';
import NoLayout from './layouts/NoLayout.vue';
const route = useRoute();
const layout = computed(() => {
return route.meta.layout === 'NoLayout' ? NoLayout : NormalLayout;
});
</script> </script>
<style>
</style>