Files
pig-farm-controller-fe/src/App.vue

37 lines
591 B
Vue
Raw Normal View History

2025-09-19 14:25:20 +08:00
<template>
2025-09-30 22:35:36 +08:00
<div id="app">
<template v-if="isLoginPage">
<router-view />
</template>
<template v-else>
<MainLayout />
</template>
</div>
2025-09-19 14:25:20 +08:00
</template>
<script>
2025-09-30 22:35:36 +08:00
import { computed } from 'vue';
import { useRoute } from 'vue-router';
2025-09-19 15:15:20 +08:00
import MainLayout from './layouts/MainLayout.vue';
2025-09-19 14:25:20 +08:00
export default {
2025-09-19 15:15:20 +08:00
name: 'App',
components: {
MainLayout
2025-09-30 22:35:36 +08:00
},
setup() {
const route = useRoute();
const isLoginPage = computed(() => route.path === '/login');
return {
isLoginPage
};
2025-09-19 15:15:20 +08:00
}
2025-09-19 14:25:20 +08:00
};
</script>
2025-09-19 14:38:47 +08:00
<style>
#app {
min-height: 100vh;
2025-09-19 14:25:20 +08:00
}
2025-09-19 15:15:20 +08:00
</style>