layouts 布局支持 <Suspense>

This commit is contained in:
Hooray
2025-03-13 15:54:09 +08:00
parent b55ea0f61b
commit 9d20a8fbe6
+3 -1
View File
@@ -111,7 +111,9 @@ const enableAppSetting = import.meta.env.VITE_APP_SETTING
<RouterView v-slot="{ Component, route }">
<Transition :name="!settingsStore.isReloading ? 'slide-right' : ''" mode="out-in">
<KeepAlive :include="keepAliveStore.list">
<component :is="Component" v-show="!isLink" :key="route.fullPath" />
<Suspense>
<component :is="Component" v-show="!isLink" :key="route.fullPath" />
</Suspense>
</KeepAlive>
</Transition>
</RouterView>