AppView.vue 495 B

1234567891011121314151617181920
  1. <script setup lang="ts">
  2. import { useTagsViewStore } from '@/store/modules/tagsView'
  3. import { computed } from 'vue'
  4. const tagsViewStore = useTagsViewStore()
  5. const getCaches = computed((): string[] => {
  6. return tagsViewStore.getCachedViews
  7. })
  8. </script>
  9. <template>
  10. <router-view>
  11. <template #default="{ Component, route }">
  12. <keep-alive :include="getCaches">
  13. <component :is="Component" :key="route.fullPath" />
  14. </keep-alive>
  15. </template>
  16. </router-view>
  17. </template>