frontend layout and infrastructure
This commit is contained in:
+10
-6
@@ -1,11 +1,15 @@
|
||||
<script setup lang="ts">
|
||||
import { RouterView } from 'vue-router'
|
||||
import MainLayout from '@/components/layouts/MainLayout.vue'
|
||||
|
||||
const route = useRoute()
|
||||
const isAuthPage = computed(() =>
|
||||
['/login', '/register'].includes(route.path)
|
||||
)
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<RouterView />
|
||||
<RouterView v-if="isAuthPage" />
|
||||
<MainLayout v-else>
|
||||
<RouterView />
|
||||
</MainLayout>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
/* 应用全局样式可以在这里添加 */
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user