jiangshuai
2024-07-24 9d94fd9277cc985f1c86b41e646e176cdf78004a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<template>
  <router-view v-slot="{ Component, route }">
    <transition name="fade" mode="out-in" appear>
      <component
        :is="Component"
        v-if="route.meta.ignoreCache"
        :key="route.fullPath"
      />
      <keep-alive v-else :include="cacheList">
        <component :is="Component" :key="route.fullPath" />
      </keep-alive>
    </transition>
  </router-view>
</template>
 
<script lang="ts" setup>
  import { computed } from 'vue';
  import { useTabBarStore } from '@/store';
 
  const tabBarStore = useTabBarStore();
 
  const cacheList = computed(() => tabBarStore.getCacheList);
</script>
 
<style scoped lang="less"></style>