<template>
  <div>
    <router-view v-slot="{ Component, route }">
      <keep-alive :include="cachedViews">
        <component :is="Component" :key="route.fullPath" />
      </keep-alive>
    </router-view>
  </div>
</template>
<script setup lang="ts">
import { useTagsViewStore } from "@/store";

defineOptions({
  name: "CommonLayout",
});

const cachedViews = computed(() => useTagsViewStore().cachedViews); // 缓存页面集合
</script>
