<!--
 * @Description: main content
 * @Author: ZCY
 * @Date: 2022年12月7日12:26:26
-->
<script lang="ts" setup>
import type { Ref } from 'vue';
import { inject } from 'vue';
import { themeColorKey } from '../../utils/injectedKeys';
import type { ThemeColor } from './types';

const { themeColor } = inject<{ themeColor: Ref<ThemeColor>; }>(themeColorKey)!;
</script>

<template>
  <main id="theMain" class="theMain" :style="{ backgroundColor: themeColor.mainBg }">
    <slot />
  </main>
</template>

<style scoped>
.theMain {
  transition: all 0.3s ease 0s;
  position: relative;
  width: 100%;
  z-index: 100;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-bottom: 1px solid #e7e7e7;
  overflow-x: hidden;
}
.theMain::-webkit-scrollbar {
  width: 0;
  height: 0;
}
.theMain:hover::-webkit-scrollbar-track-piece {
  background: transparent;
}
.theMain:hover::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.theMain:hover::-webkit-scrollbar-thumb {
  background: #aaa;
  border-radius: 20px;
}
.theMain .u-table {
  padding: 12px 0;
}
</style>
