You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
495 B
Vue
21 lines
495 B
Vue
|
4 years ago
|
<script setup lang="ts">
|
||
|
|
import { useTagsViewStore } from '@/store/modules/tagsView'
|
||
|
|
import { computed } from 'vue'
|
||
|
|
|
||
|
|
const tagsViewStore = useTagsViewStore()
|
||
|
|
|
||
|
|
const getCaches = computed((): string[] => {
|
||
|
|
return tagsViewStore.getCachedViews
|
||
|
|
})
|
||
|
|
</script>
|
||
|
|
|
||
|
|
<template>
|
||
|
|
<router-view>
|
||
|
|
<template #default="{ Component, route }">
|
||
|
|
<keep-alive :include="getCaches">
|
||
|
|
<component :is="Component" :key="route.fullPath" />
|
||
|
|
</keep-alive>
|
||
|
|
</template>
|
||
|
|
</router-view>
|
||
|
|
</template>
|