mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-24 07:49:47 +08:00
feat(projects): 添加multiTab标签页
This commit is contained in:
@ -1,7 +1,12 @@
|
||||
<template>
|
||||
<n-scrollbar ref="scrollbar" class="h-full" :x-scrollable="true" :content-class="fullPage ? 'h-full' : ''">
|
||||
<div class="inline-block w-full" :class="[fullPage ? 'h-full' : 'min-h-100vh']">
|
||||
<router-view />
|
||||
<router-view v-slot="{ Component }">
|
||||
<keep-alive v-if="keepAlive">
|
||||
<component :is="Component" />
|
||||
</keep-alive>
|
||||
<component :is="Component" v-else />
|
||||
</router-view>
|
||||
</div>
|
||||
</n-scrollbar>
|
||||
</template>
|
||||
@ -15,6 +20,9 @@ import { useScrollBehavior } from '@/hooks';
|
||||
const route = useRoute();
|
||||
const { scrollbar, resetScrollWatcher } = useScrollBehavior();
|
||||
|
||||
/** 缓存页面 */
|
||||
const keepAlive = computed(() => Boolean(route.meta?.keepAlive));
|
||||
|
||||
/** 100%视高 */
|
||||
const fullPage = computed(() => Boolean(route.meta?.fullPage));
|
||||
|
||||
|
Reference in New Issue
Block a user