mirror of
https://github.com/acepanel/panel.git
synced 2026-02-05 00:39:32 +08:00
20 lines
516 B
Vue
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>
|