Files
td_official/src/views/ProjectScreen/index.vue

92 lines
2.1 KiB
Vue
Raw Normal View History

2025-08-21 20:38:44 +08:00
<template>
2025-08-22 17:47:58 +08:00
<div class="large_screen">
<Header :projectId="projectId" @changePage="handleChangePage" />
2025-08-21 20:38:44 +08:00
<div class="nav">
2025-08-22 17:47:58 +08:00
<div class="nav_left" v-if="!isHide" :class="{ 'slide-out-left': isHiding }">
<leftPage :projectId="projectId" />
</div>
<div class="nav_center" :class="{ 'full-width': isHiding }">
<centerPage :projectId="projectId" :hideFooter="isHiding" :isHide="isHide" />
</div>
<div class="nav_right" v-if="!isHide" :class="{ 'slide-out-right': isHiding }">
<rightPage :projectId="projectId" />
</div>
2025-08-21 20:38:44 +08:00
</div>
</div>
</template>
<script setup lang="ts">
import Header from './components/header.vue';
import leftPage from './components/leftPage.vue';
import centerPage from './components/centerPage.vue';
import rightPage from './components/rightPage.vue';
2025-08-22 17:47:58 +08:00
import { useUserStoreHook } from '@/store/modules/user';
2025-08-21 20:38:44 +08:00
2025-08-22 17:47:58 +08:00
const userStore = useUserStoreHook();
const projectId = computed(() => userStore.selectedProject.id);
const isHide = ref(false)
const isHiding = ref(false)
const handleChangePage = () => {
isHiding.value = true;
setTimeout(() => {
isHide.value = !isHide.value;
isHiding.value = false;
}, 500);
}
2025-08-21 20:38:44 +08:00
</script>
<style lang="scss" scoped>
2025-08-22 17:47:58 +08:00
.large_screen {
2025-08-21 20:38:44 +08:00
width: 100vw;
height: 100vh;
background: url('@/assets/large/bg.png') no-repeat;
background-size: 100% 100%;
2025-08-22 17:47:58 +08:00
background-attachment: fixed;
2025-08-21 20:38:44 +08:00
background-color: rgba(4, 7, 17, 1);
2025-08-22 17:47:58 +08:00
overflow: hidden;
2025-08-21 20:38:44 +08:00
}
.nav {
display: flex;
2025-08-22 17:47:58 +08:00
justify-content: center;
gap: 15px;
width: calc(100vw - 30px);
height: calc(100vh - 90px);
margin: 0 auto;
2025-08-21 20:38:44 +08:00
box-sizing: border-box;
color: #fff;
}
.nav_left,
.nav_right {
2025-08-22 17:47:58 +08:00
width: 25vw;
transition: transform 1s ease, opacity 1s ease;
flex-shrink: 0;
2025-08-21 20:38:44 +08:00
}
.nav_center {
2025-08-22 17:47:58 +08:00
flex: 1 1 auto;
min-width: 0;
transition: all 1s ease;
}
/* 中间面板全屏动画 */
.full-width {
/* 取消flex增长使用固定宽度 */
width: calc(100vw - 30px);
flex: none;
}
.slide-out-left {
transform: translateX(-100%);
opacity: 0;
}
.slide-out-right {
transform: translateX(100%);
opacity: 0;
2025-08-21 20:38:44 +08:00
}
</style>