mirror of
https://gitee.com/xiangheng/x_admin.git
synced 2025-10-15 20:52:11 +08:00
22 lines
753 B
Vue
22 lines
753 B
Vue
<template>
|
|
<router-view v-if="isRouteShow" v-slot="{ Component, route }">
|
|
<keep-alive :include="includeList" :max="20">
|
|
<component :is="Component" :key="route.fullPath" />
|
|
</keep-alive>
|
|
</router-view>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import { computed } from 'vue'
|
|
import useAppStore from '@/stores/modules/app'
|
|
import useTabsStore from '@/stores/modules/multipleTabs'
|
|
import useSettingStore from '@/stores/modules/setting'
|
|
const appStore = useAppStore()
|
|
const tabsStore = useTabsStore()
|
|
const settingStore = useSettingStore()
|
|
const isRouteShow = computed(() => appStore.isRouteShow)
|
|
const includeList = computed(() => (settingStore.openMultipleTabs ? tabsStore.getCacheTabList : []))
|
|
</script>
|
|
|
|
<style></style>
|