WholeProcessPlatform/frontend/src/layout/components/AppMain.vue

35 lines
945 B
Vue
Raw Normal View History

2026-03-25 10:02:19 +08:00
<script setup lang="ts">
import { computed } from "vue"
import { useTagsViewStore } from '@/store/modules/tagsView';
import { useRoute, } from 'vue-router';
const tagsViewStore = useTagsViewStore();
const router = useRoute();
const routeKey = computed(() => router.path + Math.random());
</script>
<template>
<section class="app-main">
<router-view v-slot="{ Component, route }" :key="routeKey">
<transition name="router-fade" mode="out-in">
<keep-alive :include="tagsViewStore.cachedViews">
<component :is="Component" :key="route.fullPath" />
</keep-alive>
</transition>
</router-view>
</section>
</template>
<style lang="scss" scoped>
2026-03-27 14:50:35 +08:00
@use "@/styles/variables.module.scss" as *;
2026-03-25 10:02:19 +08:00
.app-main {
2026-03-27 14:50:35 +08:00
min-height: calc(100vh - $layout-header-height - $locationbar-height);
2026-03-25 10:02:19 +08:00
width: 100%;
position: relative;
overflow: hidden;
2026-03-27 14:50:35 +08:00
background-color: #ffffff;
2026-03-25 10:02:19 +08:00
box-sizing: border-box;
}
</style>