Refactor MainLayout.vue to improve component rendering logic
This commit is contained in:
parent
397cf28673
commit
5fffd4d2f5
@ -18,12 +18,12 @@
|
||||
</header>
|
||||
|
||||
<main class="page-container">
|
||||
<keep-alive>
|
||||
<router-view v-slot="{ Component, route }">
|
||||
<component :is="Component" v-if="route.meta.keepAlive" />
|
||||
<component :is="Component" v-else :key="route.fullPath" />
|
||||
</router-view>
|
||||
</keep-alive>
|
||||
<router-view v-slot="{ Component, route }">
|
||||
<keep-alive v-if="route.meta.keepAlive">
|
||||
<component :is="Component" />
|
||||
</keep-alive>
|
||||
<component v-else :is="Component" :key="route.fullPath" />
|
||||
</router-view>
|
||||
</main>
|
||||
|
||||
<OfflineIndicator />
|
||||
@ -76,7 +76,6 @@ const initializeApp = async () => {
|
||||
console.error('Failed to initialize app:', error);
|
||||
// Don't automatically logout - let the API interceptor handle token refresh
|
||||
// The response interceptor will handle 401s and refresh tokens automatically
|
||||
console.log('Token may need refresh, will be handled by API interceptor');
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user