Skip to content

Commit ce7477b

Browse files
committed
feat: layouts 布局支持 <Suspense>
1 parent 609e77c commit ce7477b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

‎src/layouts/index.vue‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,9 @@ const enableAppSetting = import.meta.env.VITE_APP_SETTING
111111
<RouterView v-slot="{ Component, route }">
112112
<Transition :name="!settingsStore.isReloading ? 'slide-right' : ''" mode="out-in">
113113
<KeepAlive :include="keepAliveStore.list">
114-
<component :is="Component" v-show="!isLink" :key="route.fullPath" />
114+
<Suspense>
115+
<component :is="Component" v-show="!isLink" :key="route.fullPath" />
116+
</Suspense>
115117
</KeepAlive>
116118
</Transition>
117119
</RouterView>

0 commit comments

Comments
 (0)