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

55 lines
1.4 KiB
Vue
Raw Normal View History

2026-03-25 10:02:19 +08:00
<script setup lang="ts">
2026-03-27 15:52:43 +08:00
import { computed } from "vue";
import { useTagsViewStore } from "@/store/modules/tagsView";
import { useRoute } from "vue-router";
import MapModal from "@/components/MapModal/index.vue";
import { useModelStore } from "@/store/modules/model";
import GisView from "@/components/gis/GisView.vue";
2026-03-25 10:02:19 +08:00
const modelStore = useModelStore();
2026-03-25 10:02:19 +08:00
const tagsViewStore = useTagsViewStore();
2026-03-27 15:52:43 +08:00
2026-03-25 10:02:19 +08:00
const router = useRoute();
const routeKey = computed(() => router.path + Math.random());
</script>
<template>
<section class="app-main">
<!-- <GisView /> -->
2026-03-27 15:52:43 +08:00
<div class="gi-panels">
<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>
</div>
<MapModal
v-model:visible="modelStore.modalVisible"
:title="modelStore.title"
:tabs-config="modelStore.tabList"
/>
2026-03-25 10:02:19 +08:00
</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;
}
2026-03-27 15:52:43 +08:00
.gi-panels {
position: absolute;
width: 100%;
height: 100%;
2026-04-20 16:57:54 +08:00
z-index: 900;
2026-03-27 15:52:43 +08:00
}
2026-03-25 10:02:19 +08:00
</style>