Commit 1ab51ad9 by Jaxon

feat: 根 router-view 元素 keep-alive 调优

1 parent ba617997
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
<div id="app" :class="$route.meta.showTabBar ? 'tab-bar-page' : ''"> <div id="app" :class="$route.meta.showTabBar ? 'tab-bar-page' : ''">
<template v-if="showWindow"> <template v-if="showWindow">
<transition name="fade"> <transition name="fade">
<keep-alive v-if="$route.meta.keepAlive"> <keep-alive>
<router-view></router-view> <router-view v-if="$route.meta.keepAlive"></router-view>
</keep-alive> </keep-alive>
</transition> </transition>
<transition name="fade"> <transition name="fade">
...@@ -55,10 +55,10 @@ export default { ...@@ -55,10 +55,10 @@ export default {
height: 100%; height: 100%;
overflow: hidden; overflow: hidden;
box-sizing: border-box; box-sizing: border-box;
padding-bottom: calc(env(safe-area-inset-bottom) / 1.5); padding-bottom: calc(env(safe-area-inset-bottom));
background-color: transparent; background-color: transparent;
} }
.tab-bar-page { .tab-bar-page {
padding-bottom: calc(46px + (env(safe-area-inset-bottom) / 1.5)) !important; padding-bottom: calc(46px + (env(safe-area-inset-bottom))) !important;
} }
</style> </style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!