<script setup lang="ts">
import YlMenu from "@/components/yl-layout/menu.vue";
import YlHeader from "@/components/yl-layout/header.vue";
</script>

<template>
  <div class="common-layout">
    <el-container>
      <el-header style="padding: 0">
        <yl-header></yl-header>
      </el-header>
      <el-container>
        <el-aside style="background-color: antiquewhite; width: fit-content">
          <yl-menu></yl-menu>
        </el-aside>
        <el-container>
          <el-main style="background-color: beige; height: calc(100vh - 90px)"
            ><el-scrollbar height="calc(100vh - 100px)" class="main-div"
              ><div style="height: calc(100vh - 100px)"><slot></slot></div
            ></el-scrollbar>
          </el-main>
          <el-footer class="flex around footer" height="30px">@ ylsa</el-footer>
        </el-container>
      </el-container>
    </el-container>
  </div>
</template>

<style scoped>
.common-layout {
  height: 100vh;
}
.footer {
  font-size: small;
  font-weight: lighter;
}
.main-div {
  box-sizing: border-box;
  background-color: #fff;
  height: 100%;
  border-radius: 7px;
  overflow: auto;
}
</style>
