2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-07 09:27:15 +08:00
Files
panel/web/src/layout/AppMain.vue
2024-10-19 20:18:23 +08:00

18 lines
459 B
Vue

<script lang="ts" setup>
import { useTabStore } from '@/store'
const tabStore = useTabStore()
const keepAliveNames = computed(() => {
return tabStore.tabs.filter((item) => item.keepAlive).map((item) => item.name)
})
</script>
<template>
<router-view v-slot="{ Component, route }">
<keep-alive :include="keepAliveNames">
<component :is="Component" v-if="!tabStore.reloading" :key="route.path" />
</keep-alive>
</router-view>
</template>