37 lines
591 B
Vue
37 lines
591 B
Vue
<template>
|
|
<div id="app">
|
|
<template v-if="isLoginPage">
|
|
<router-view />
|
|
</template>
|
|
<template v-else>
|
|
<MainLayout />
|
|
</template>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import { computed } from 'vue';
|
|
import { useRoute } from 'vue-router';
|
|
import MainLayout from './layouts/MainLayout.vue';
|
|
|
|
export default {
|
|
name: 'App',
|
|
components: {
|
|
MainLayout
|
|
},
|
|
setup() {
|
|
const route = useRoute();
|
|
const isLoginPage = computed(() => route.path === '/login');
|
|
|
|
return {
|
|
isLoginPage
|
|
};
|
|
}
|
|
};
|
|
</script>
|
|
|
|
<style>
|
|
#app {
|
|
min-height: 100vh;
|
|
}
|
|
</style> |