fix(projects): 修复页面滚动和页面100%视高占比

This commit is contained in:
Soybean
2021-09-22 22:27:05 +08:00
parent fa0a907941
commit fa2cc78937
5 changed files with 384 additions and 587 deletions

View File

@ -1,10 +1,15 @@
<template>
<n-scrollbar ref="scrollbar" class="h-full" :x-scrollable="true" :content-class="routeProps.fullPage ? 'h-full' : ''">
<div class="inline-block w-full" :class="[routeProps.fullPage ? 'h-full' : 'min-h-100vh']">
<div class="inline-block w-full h-full">
<router-view v-slot="{ Component, route: itemRoute }">
<transition :name="theme.pageStyle.animateType" mode="out-in" appear>
<keep-alive :include="cacheRoutes">
<component :is="Component" v-if="reload" :key="itemRoute.fullPath" />
<component
:is="Component"
v-if="reload"
:key="itemRoute.fullPath"
:class="{ 'min-h-100vh': !routeProps.fullPage }"
/>
</keep-alive>
</transition>
</router-view>