1234567891011121314151617181920212223242526272829303132 |
- <template>
- <div class="main-page">
- <RouterView v-slot="{ Component }" v-if="$route.meta.keepAlive">
- <keep-alive :include="['homePage','index']">
- <component :is="Component" :key="$route.path" />
- </keep-alive>
- </RouterView>
- <RouterView v-else :key="$route.path" />
- </div>
- </template>
- <script lang="ts" setup name="BasicLayoutPage">
- import { onMounted } from 'vue';
- onMounted(() => {
- // activeTab.value = tabItem.findIndex((item) => item.key === router.currentRoute.value.path.replace('/', ''));
- });
- </script>
- <style scoped lang="scss">
- .nut-navbar {
- margin-bottom: 0;
- }
- .main-page {
- box-sizing: border-box;
- // padding: 40px;
- // height: calc(100vh - 200px);
- max-height: 100vh;
- overflow-y: scroll;
- overflow-x: hidden;
- }
- </style>
|