<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>
|