后台界面独立
This commit is contained in:
+11
-1
@@ -1,11 +1,21 @@
|
||||
<script setup lang="ts">
|
||||
import { RouterView } from 'vue-router'
|
||||
import { computed } from 'vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
|
||||
import AdminLayout from './layouts/AdminLayout.vue'
|
||||
import AppLayout from './layouts/AppLayout.vue'
|
||||
|
||||
const route = useRoute()
|
||||
const layout = computed(() => route.meta.layout || 'app')
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<AppLayout>
|
||||
<AdminLayout v-if="layout === 'admin'">
|
||||
<RouterView />
|
||||
</AdminLayout>
|
||||
<RouterView v-else-if="layout === 'blank'" />
|
||||
<AppLayout v-else>
|
||||
<RouterView />
|
||||
</AppLayout>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user