fix(projects): 布局修复:从填充屏幕高的页面切换至滚动页面导致布局坍塌

This commit is contained in:
Soybean 2021-11-21 16:31:00 +08:00
parent 6de48ad93e
commit 2fdb5f563f
2 changed files with 12 additions and 16 deletions

View File

@ -1,20 +1,16 @@
<template> <template>
<div class="flex-1-hidden bg-[#f6f9f8] dark:bg-deep-dark p-16px transition-all duration-300 ease-in-out"> <div
<div class="min-h-full" :class="{ 'h-full overflow-hidden': routeProps.fullPage }"> class="flex-1 flex-col-stretch bg-[#f6f9f8] dark:bg-deep-dark p-16px transition-all duration-300 ease-in-out"
:class="{ 'overflow-hidden': routeProps.fullPage }"
>
<router-view v-slot="{ Component, route }"> <router-view v-slot="{ Component, route }">
<transition :name="theme.pageAnimateType" mode="out-in" appear> <transition :name="theme.pageAnimateType" mode="out-in" appear>
<keep-alive :include="cacheRoutes"> <keep-alive :include="cacheRoutes">
<component <component :is="Component" v-if="app.reloadFlag" :key="route.fullPath" class="flex-1" />
:is="Component"
v-if="app.reloadFlag"
:key="route.fullPath"
:class="{ 'h-full': routeProps.fullPage }"
/>
</keep-alive> </keep-alive>
</transition> </transition>
</router-view> </router-view>
</div> </div>
</div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">

View File

@ -1,5 +1,5 @@
<template> <template>
<n-drawer v-model:show="app.settingDrawer.visible" :width="330"> <n-drawer v-model:show="app.settingDrawer.visible" display-directive="show" :width="330">
<n-drawer-content title="主题配置" :native-scrollbar="false"> <n-drawer-content title="主题配置" :native-scrollbar="false">
<dark-mode /> <dark-mode />
<nav-mode /> <nav-mode />