Update RouterView.vue

This commit is contained in:
syuilo
2025-03-11 17:29:00 +09:00
parent 7d86efd087
commit 5fe23d3f69

View File

@@ -4,13 +4,18 @@ SPDX-License-Identifier: AGPL-3.0-only
--> -->
<template> <template>
<Suspense :timeout="0"> <KeepAlive
<component :is="currentPageComponent" :key="key" v-bind="Object.fromEntries(currentPageProps)"/> :max="prefer.s.numberOfPageCache"
:exclude="pageCacheController"
>
<Suspense :timeout="0">
<component :is="currentPageComponent" :key="key" v-bind="Object.fromEntries(currentPageProps)"/>
<template #fallback> <template #fallback>
<MkLoading/> <MkLoading/>
</template> </template>
</Suspense> </Suspense>
</KeepAlive>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
@@ -74,8 +79,8 @@ async function onChange({ resolved, key: newKey }) {
key.value = newKey + JSON.stringify(Object.fromEntries(current.props)); key.value = newKey + JSON.stringify(Object.fromEntries(current.props));
nextTick(async () => { nextTick(async () => {
res(); //res();
//setTimeout(res, 1000); setTimeout(res, 100);
// ページ遷移完了後に再びキャッシュを有効化 // ページ遷移完了後に再びキャッシュを有効化
if (clearCacheRequested.value) { if (clearCacheRequested.value) {