<template>
  <div class="layout">
    <div class="container">
      <div class="header" :class="classes">
        <Tab />
        <Slider />
      </div>
      <div class="main">
        <router-view></router-view>
      </div>
    </div>
  </div>
</template>

<script>
import Tab from './components/tab.vue'
import Slider from './components/slider.vue'
export default {
  props: { fixed: { type: Boolean, default: false } },
  components: { Tab, Slider },
  computed: {
    classes() {
      return {
        'is-fixed': this.fixed
      }
    }
  }
}
</script>

<style lang="scss" scoped>
.layout {
  height: 100%;
  width: 100%;
  .container {
    height: 100%;
    position: relative;
    .header {
      position: sticky;
      top: 0;
      width: 100%;
      padding: 0px;
      z-index: 10;
      &.is-fixed {
        position: fixed;
      }
    }
    .main {
      position: relative;
      padding: 0px;
      width: 100%;
      height: 100%;
    }
  }
}
</style>
