2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-05 00:39:32 +08:00
Files
panel/web/src/layout/AppMain.vue
2026-01-13 18:46:13 +08:00

20 lines
516 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>
<div class="flex flex-col wh-full">
<router-view v-slot="{ Component, route }">
<keep-alive :include="keepAliveNames">
<component :is="Component" v-if="!tabStore.reloading" :key="route.path" />
</keep-alive>
</router-view>
</div>
</template>