Skip to content

Commit

Permalink
fix: After the static route is switched, the interface goes blank
Browse files Browse the repository at this point in the history
  • Loading branch information
smileluck committed Jul 10, 2024
1 parent e035eab commit dc60ea3
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/layouts/modules/global-content/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,14 @@ function resetScroll() {
@after-enter="appStore.setContentXScrollable(false)"
>
<KeepAlive :include="routeStore.cacheRoutes">
<component
:is="Component"
v-if="appStore.reloadFlag"
:key="tabStore.getTabIdByRoute(route)"
:class="{ 'p-16px': showPadding }"
class="flex-grow bg-layout transition-300"
/>
<div class="size-full" :key="tabStore.getTabIdByRoute(route)"
:class="{ 'p-16px': showPadding }">
<component
:is="Component"
v-if="appStore.reloadFlag"
class="flex-grow bg-layout transition-300"
/>
</div>
</KeepAlive>
</Transition>
</RouterView>
Expand Down

0 comments on commit dc60ea3

Please sign in to comment.