fix(client): タイムラインのkeep-aliveが効かなくなっているのを修正

This commit is contained in:
syuilo 2022-01-21 21:47:36 +09:00
parent 8cdc619f8f
commit 4ee859b691
5 changed files with 10 additions and 4 deletions

View File

@ -17,6 +17,12 @@
</MkSpacer>
</template>
<script lang="ts">
export default {
name: 'MkTimelinePage',
}
</script>
<script lang="ts" setup>
import { defineAsyncComponent, computed, watch } from 'vue';
import XTimeline from '@/components/timeline.vue';

View File

@ -16,7 +16,7 @@
<template #header><MkHeader v-if="pageInfo && !pageInfo.hideHeader" :info="pageInfo"/></template>
<router-view v-slot="{ Component }">
<transition :name="$store.state.animation ? 'page' : ''" mode="out-in" @enter="onTransition">
<keep-alive :include="['timeline']">
<keep-alive :include="['MkTimelinePage']">
<component :is="Component" :ref="changePage"/>
</keep-alive>
</transition>

View File

@ -11,7 +11,7 @@
<template #header><MkHeader v-if="pageInfo && !pageInfo.hideHeader" :info="pageInfo"/></template>
<router-view v-slot="{ Component }">
<transition>
<keep-alive :include="['timeline']">
<keep-alive :include="['MkTimelinePage']">
<component :is="Component" :ref="changePage" @contextmenu.stop="onContextmenu"/>
</keep-alive>
</transition>

View File

@ -9,7 +9,7 @@
<template #header><MkHeader v-if="pageInfo && !pageInfo.hideHeader" :info="pageInfo"/></template>
<router-view v-slot="{ Component }">
<transition :name="$store.state.animation ? 'page' : ''" mode="out-in" @enter="onTransition">
<keep-alive :include="['timeline']">
<keep-alive :include="['MkTimelinePage']">
<component :is="Component" :ref="changePage"/>
</keep-alive>
</transition>

View File

@ -8,7 +8,7 @@
<div class="content">
<router-view v-slot="{ Component }">
<transition :name="$store.state.animation ? 'page' : ''" mode="out-in" @enter="onTransition">
<keep-alive :include="['timeline']">
<keep-alive :include="['MkTimelinePage']">
<component :is="Component" :ref="changePage"/>
</keep-alive>
</transition>