2026-06-17 11:48:43 +08:00
|
|
|
<template>
|
|
|
|
|
<div class="base-layout">
|
|
|
|
|
<!-- 顶部导航栏 -->
|
2026-06-18 10:37:13 +08:00
|
|
|
<div class="base-layout__topbar">
|
|
|
|
|
<div class="base-layout__topbar-title">
|
|
|
|
|
<span class="base-layout__topbar-game-icon">{{ activeGameIcon }}</span>
|
|
|
|
|
<span class="base-layout__topbar-game-name">{{ activeGameName }}</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2026-06-17 11:48:43 +08:00
|
|
|
|
|
|
|
|
<!-- 主体区域 -->
|
|
|
|
|
<div class="base-layout__main">
|
|
|
|
|
<!-- 侧边栏 -->
|
|
|
|
|
<div class="base-layout__sidebar">
|
|
|
|
|
<!-- 侧边栏内容 -->
|
2026-06-18 10:15:13 +08:00
|
|
|
<div class="base-layout__sidebar-content">
|
|
|
|
|
<GameList />
|
|
|
|
|
</div>
|
2026-06-17 11:48:43 +08:00
|
|
|
<!-- 侧边栏底部固定区域 -->
|
|
|
|
|
<div class="base-layout__sidebar-bottom">
|
2026-06-17 14:36:02 +08:00
|
|
|
<div class="base-layout__sidebar-bottom-inner">
|
|
|
|
|
<UserBar />
|
|
|
|
|
</div>
|
2026-06-17 11:48:43 +08:00
|
|
|
</div>
|
|
|
|
|
<!-- 拖拽调整宽度的手柄 -->
|
|
|
|
|
<div class="base-layout__resize-handle"></div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- 主内容区域 -->
|
|
|
|
|
<div class="base-layout__content"></div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
2026-06-17 14:36:02 +08:00
|
|
|
<script setup lang="ts">
|
2026-06-18 10:15:13 +08:00
|
|
|
import UserBar from '@/components/baseLayouts/UserBar.vue'
|
|
|
|
|
import GameList from '@/components/baseLayouts/GameList.vue'
|
2026-06-18 10:37:13 +08:00
|
|
|
import { useBaseLayoutStore } from '@/stores'
|
|
|
|
|
import { storeToRefs } from 'pinia'
|
|
|
|
|
|
|
|
|
|
const baseLayoutStore = useBaseLayoutStore()
|
|
|
|
|
const { activeGameIcon, activeGameName } = storeToRefs(baseLayoutStore)
|
2026-06-17 14:36:02 +08:00
|
|
|
</script>
|
2026-06-17 11:48:43 +08:00
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
|
|
.base-layout {
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
height: 100lvh;
|
|
|
|
|
width: 100lvw;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.base-layout__topbar {
|
|
|
|
|
display: flex;
|
2026-06-18 10:37:13 +08:00
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
2026-06-17 11:48:43 +08:00
|
|
|
width: 100%;
|
2026-06-18 09:19:23 +08:00
|
|
|
height: 30px;
|
2026-06-18 10:37:13 +08:00
|
|
|
padding: 0 12px;
|
2026-06-17 11:48:43 +08:00
|
|
|
background-color: #fde68a; // amber-200
|
|
|
|
|
}
|
|
|
|
|
|
2026-06-18 10:37:13 +08:00
|
|
|
.base-layout__topbar-title {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: baseline;
|
|
|
|
|
gap: 6px;
|
|
|
|
|
height: 30px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.base-layout__topbar-game-icon {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
font-size: 16px;
|
|
|
|
|
line-height: 1;
|
|
|
|
|
height: 100%;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.base-layout__topbar-game-name {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
font-size: 13px;
|
|
|
|
|
font-weight: 500;
|
|
|
|
|
line-height: 1;
|
|
|
|
|
height: 100%;
|
|
|
|
|
color: #1a1a1a;
|
|
|
|
|
}
|
|
|
|
|
|
2026-06-17 11:48:43 +08:00
|
|
|
.base-layout__main {
|
|
|
|
|
display: flex;
|
|
|
|
|
flex: 1;
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 100%;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.base-layout__sidebar {
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
position: relative;
|
|
|
|
|
width: 400px;
|
|
|
|
|
height: 100%;
|
|
|
|
|
padding: 8px;
|
|
|
|
|
background-color: #fcd34d; // amber-300
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.base-layout__sidebar-content {
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
height: 100%;
|
|
|
|
|
width: 100%;
|
|
|
|
|
padding-bottom: 72px;
|
|
|
|
|
background-color: #f59e0b; // amber-500
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.base-layout__sidebar-bottom {
|
|
|
|
|
position: absolute;
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-shrink: 0;
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 72px;
|
|
|
|
|
left: 0;
|
|
|
|
|
bottom: 0;
|
|
|
|
|
padding: 8px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.base-layout__sidebar-bottom-inner {
|
|
|
|
|
display: flex;
|
|
|
|
|
flex: 1;
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 100%;
|
|
|
|
|
border-radius: 12px;
|
|
|
|
|
background-color: #92400e; // amber-800
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.base-layout__resize-handle {
|
|
|
|
|
position: absolute;
|
|
|
|
|
width: 4px;
|
|
|
|
|
height: 100%;
|
|
|
|
|
top: 0;
|
|
|
|
|
right: 0;
|
|
|
|
|
cursor: ew-resize;
|
|
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
|
background-color: #d1d5db; // gray-300
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.base-layout__content {
|
|
|
|
|
display: flex;
|
|
|
|
|
flex: 1;
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 100%;
|
|
|
|
|
background-color: #fbbf24; // amber-400
|
|
|
|
|
}
|
|
|
|
|
</style>
|