AppView.vue 582 B

12345678910111213141516171819202122
  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. <section class="p-[var(--app-content-padding)] w-[100%]">
  11. <router-view>
  12. <template #default="{ Component, route }">
  13. <keep-alive :include="getCaches">
  14. <component :is="Component" :key="route.fullPath" />
  15. </keep-alive>
  16. </template>
  17. </router-view>
  18. </section>
  19. </template>