mirror of
https://gitee.com/likeadmin/likeadmin_java.git
synced 2026-06-20 09:12:55 +08:00
多标签tabs 调整
This commit is contained in:
@@ -3,7 +3,9 @@
|
||||
<el-scrollbar>
|
||||
<div class="p-4">
|
||||
<router-view v-if="isRouteShow" v-slot="{ Component, route }">
|
||||
<component :is="Component" :key="route.fullPath" />
|
||||
<keep-alive :include="includeList" :max="20">
|
||||
<component :is="Component" :key="route.fullPath" />
|
||||
</keep-alive>
|
||||
</router-view>
|
||||
</div>
|
||||
</el-scrollbar>
|
||||
@@ -12,8 +14,13 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
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>
|
||||
|
||||
Reference in New Issue
Block a user