Files
orion-visor/orion-ops-ui/src/layout/page-layout.vue

27 lines
720 B
Vue
Raw Normal View History

2023-07-24 10:05:07 +08:00
<template>
<router-view v-slot="{ Component, route }">
<transition name="fade" mode="out-in" appear>
2023-07-27 18:48:15 +08:00
<!-- 渲染组件 -->
2023-12-01 17:29:42 +08:00
<component :is="Component"
v-if="route.meta.ignoreCache"
:key="route.fullPath" />
2023-07-27 18:48:15 +08:00
<!-- 渲染缓存组件 -->
2023-07-24 10:05:07 +08:00
<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>
2023-10-25 10:26:14 +08:00
<style lang="less" scoped>
</style>