|
|
@@ -0,0 +1,50 @@
|
|
|
+<template>
|
|
|
+ <div class="app-wrapper">
|
|
|
+ <SiderBar class="sidebar-container" />
|
|
|
+ <Header class="header-container" />
|
|
|
+ <AppMain class="main-container" />
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script setup lang="ts">
|
|
|
+import SiderBar from './components/SiderBar/index.vue'
|
|
|
+import Header from './components/Header.vue'
|
|
|
+import AppMain from './components/AppMain.vue'
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="scss" scoped>
|
|
|
+.app-wrapper {
|
|
|
+ display: grid;
|
|
|
+ width: 100vw;
|
|
|
+ height: 100vh;
|
|
|
+ /* 定义列:左侧300px,右侧自适应占据剩余空间 */
|
|
|
+ grid-template-columns: 300px 1fr;
|
|
|
+ /* 定义行:顶部88px,底部自适应占据剩余空间 */
|
|
|
+ grid-template-rows: 88px 1fr;
|
|
|
+ /* 使用 grid-template-areas 定义布局区域 */
|
|
|
+ grid-template-areas:
|
|
|
+ "sidebar header"
|
|
|
+ "sidebar main";
|
|
|
+ overflow: hidden;
|
|
|
+}
|
|
|
+
|
|
|
+.sidebar-container {
|
|
|
+ grid-area: sidebar;
|
|
|
+ /* 根据截图大概的深色背景占位,后续可替换 */
|
|
|
+ background-color: #1a1a24;
|
|
|
+ color: #fff;
|
|
|
+}
|
|
|
+
|
|
|
+.header-container {
|
|
|
+ grid-area: header;
|
|
|
+ background-color: #141419;
|
|
|
+ color: #fff;
|
|
|
+}
|
|
|
+
|
|
|
+.main-container {
|
|
|
+ grid-area: main;
|
|
|
+ background-color: #0d0d12;
|
|
|
+ color: #fff;
|
|
|
+ overflow: auto; /* 内容超出时主区域内部滚动 */
|
|
|
+}
|
|
|
+</style>
|