update code

main
haha 2024-08-03 01:00:57 +08:00
parent 3f2741c473
commit 4507369487
1 changed files with 20 additions and 20 deletions

View File

@ -1,18 +1,17 @@
<template> <template>
<section class="app-main"> <section class="app-main">
<el-scrollbar height="calc(100vh - 76px)"> <el-scrollbar height="calc(100vh - 76px)">
<router-view> <router-view>
<template #default="{ Component, route }"> <template #default="{ Component, route }">
<transition <transition enter-active-class="animate__animated animate__fadeIn" mode="out-in">
enter-active-class="animate__animated animate__fadeIn" <keep-alive :include="cachedViews">
mode="out-in" <div>
> <component :is="Component" :key="route.path" />
<keep-alive :include="cachedViews"> </div>
<component :is="Component" :key="route.path" /> </keep-alive>
</keep-alive> </transition>
</transition> </template>
</template> </router-view>
</router-view>
</el-scrollbar> </el-scrollbar>
</section> </section>
</template> </template>
@ -28,8 +27,9 @@ const cachedViews = computed(() => useTagsViewStore().cachedViews); // 缓存页
position: relative; position: relative;
width: 100%; width: 100%;
min-height: calc(100vh - 100px); min-height: calc(100vh - 100px);
overflow: hidden; overflow: hidden;
:deep(.el-scrollbar__view){
:deep(.el-scrollbar__view) {
height: 100%; height: 100%;
} }
} }
@ -38,19 +38,19 @@ const cachedViews = computed(() => useTagsViewStore().cachedViews); // 缓存页
min-height: calc(100vh - $navbar-height - $tags-view-height); min-height: calc(100vh - $navbar-height - $tags-view-height);
} }
.fixed-header + .app-main { .fixed-header+.app-main {
min-height: 100vh; min-height: 100vh;
padding-top: $navbar-height; padding-top: $navbar-height;
} }
.hasTagsView .fixed-header + .app-main { .hasTagsView .fixed-header+.app-main {
min-height: 100vh; min-height: 100vh;
padding-top: $navbar-height + $tags-view-height; padding-top: $navbar-height + $tags-view-height;
} }
.layout-mix, .layout-mix,
.layout-top { .layout-top {
.fixed-header + .app-main { .fixed-header+.app-main {
padding-top: 0; padding-top: 0;
} }
} }
@ -67,11 +67,11 @@ const cachedViews = computed(() => useTagsViewStore().cachedViews); // 缓存页
min-height: calc(100vh - $navbar-height - $tags-view-height); min-height: calc(100vh - $navbar-height - $tags-view-height);
} }
.fixed-header + .app-main { .fixed-header+.app-main {
min-height: calc(100vh - $navbar-height); min-height: calc(100vh - $navbar-height);
} }
.hasTagsView .fixed-header + .app-main { .hasTagsView .fixed-header+.app-main {
height: calc(100vh - $navbar-height); height: calc(100vh - $navbar-height);
min-height: calc(100vh - $navbar-height); min-height: calc(100vh - $navbar-height);
padding-top: $tags-view-height; padding-top: $tags-view-height;
@ -79,7 +79,7 @@ const cachedViews = computed(() => useTagsViewStore().cachedViews); // 缓存页
} }
.layout-top { .layout-top {
.hasTagsView .fixed-header + .app-main { .hasTagsView .fixed-header+.app-main {
padding-top: $tags-view-height; padding-top: $tags-view-height;
} }
} }