<template>
  <!-- <section class="app-main">
    <transition name="fade-transform" mode="out-in">
        <router-view :key="$route.path" />
    </transition>
  </section> -->
  <!-- <router-view></router-view> -->
  <router-view v-slot="{ Component }">
    <keep-alive :include="cachedRoutes">
      <component :is="Component"></component>
    </keep-alive>
  </router-view>
</template>

<script lang="ts" setup>
import { ref } from 'vue'
import { useRoute } from 'vue-router'
import settingStore from '@/store/module/setting'
const $route = useRoute()
const useSettingStore = settingStore()
console.log($route)
// 缓存的路由名称列表
const cachedRoutes = ref(['Home']) // 根据路由的 name 控制缓存
useSettingStore.setLogo()
</script>

<style lang="scss" scoped></style>
