<template>
  <div class="layer">
    <ly-top />
    <div class="content">
      <ly-slide class="slide" />
      <div class="view">
        <ly-player class="player" />
        <div class="main">
          <router-view v-slot="{ Component }">
            <!-- <keep-alive > -->
              <component :is="Component" />
            <!-- </keep-alive> -->
          </router-view>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import lyTop from './top'
import lySlide from './slide'
import lyPlayer from './player'

export default {
  components: {
    'ly-top': lyTop,
    'ly-slide': lySlide,
    'ly-player': lyPlayer,
    
  }
}
</script>

<style lang="scss" scoped>
.layer {
  position: absolute;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;

  .top {
    flex: 0 0 auto;
    height: 5.33rem;
    box-sizing: border-box;
  }

  .content {
    flex: 1 0;
    display: flex;
    overflow: hidden;

    .slide {
      width: 16.66rem;
      flex: 0 0 auto;
    }

    .view {
      flex: 0 0 auto;
      width: calc(100% - 16.66rem);
      background-color: var(--bgColor);
      flex-direction: column;
      display: flex;

      .player {
        flex: 0 0 auto;
        height: 32px;
      }

      .main {
        margin: 16px;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        flex: 1;
      }
    }
  }
}
</style>