2022-05-25 21:53:38 +08:00

46 lines
941 B
Vue

<script lang="ts" setup>
import { computed } from "vue"
import { useRoute } from "vue-router"
const route = useRoute()
const key = computed(() => {
return route.path
})
</script>
<template>
<section class="app-main">
<router-view v-slot="{ Component }">
<transition name="fade-transform" mode="out-in">
<!-- <keep-alive> -->
<component :is="Component" :key="key" />
<!-- </keep-alive> -->
</transition>
</router-view>
</section>
</template>
<style lang="scss" scoped>
.app-main {
min-height: calc(100vh - var(--v3-navigationbar-height));
width: 100%;
position: relative;
overflow: hidden;
}
.fixed-header + .app-main {
padding-top: var(--v3-navigationbar-height);
height: 100vh;
overflow: auto;
}
.hasTagsView {
.app-main {
min-height: calc(100vh - var(--v3-header-height));
}
.fixed-header + .app-main {
padding-top: var(--v3-header-height);
}
}
</style>