레이아웃 필요없는 경우(login) 등을 위해 코드 추가
This commit is contained in:
parent
d56f375767
commit
b7b9fca3dd
15
src/App.vue
15
src/App.vue
@ -1,12 +1,19 @@
|
||||
<template>
|
||||
<normal-layout>
|
||||
<component :is="layout">
|
||||
<template #content>
|
||||
<router-view></router-view>
|
||||
</template>
|
||||
</normal-layout>
|
||||
</component>
|
||||
</template>
|
||||
<script setup>
|
||||
import { computed } from 'vue';
|
||||
import { useRoute } from 'vue-router';
|
||||
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>
|
||||
<style>
|
||||
</style>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user