레이아웃 필요없는 경우(login) 등을 위해 코드 추가
This commit is contained in:
parent
d56f375767
commit
b7b9fca3dd
15
src/App.vue
15
src/App.vue
@ -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>
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user