he wei
2024-08-22 e95a09669478c2ae9e93517183478e90bad0af36
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<script setup>
import { ref, computed } from "vue";
import { useRoute, useRouter } from "vue-router";
import { useTagsViewStore } from "@/stores/tagsView";
import { storeToRefs } from "pinia";
 
const tagsViewStore = useTagsViewStore();
const { cachedViews } = storeToRefs(tagsViewStore);
const $route = useRoute();
 
// const key = computed(() => {
//   if ($route.name == "history") {
//     return $route.fullPath;
//   } else {
//     return $route.name;
//   }
// });
</script>
<template>
  <section class="page-home-content">
    <!-- <transition name="fade-transform" mode="out-in"> -->
    <!-- <router-view :key="key" v-slot="{ Component }"> -->
    <router-view v-slot="{ Component }">
      <keep-alive :include="cachedViews">
        <component :is="Component" />
      </keep-alive>
    </router-view>
    <!-- </transition> -->
  </section>
</template>
 
<style scoped>
.page-home-content {
  width: 100%;
  height: 100%;
  padding-top: 8px;
  box-sizing: border-box;
}
</style>