<template>
  <div :class="classObj" class="app-wrapper">
    <app-header class="app-header"/>
    <div class="app-body">
      <!--右半部分-->
      <div>
        <!--主页-->
        <el-scrollbar>
          <app-main/>
        </el-scrollbar>
      </div>
    </div>
  </div>
</template>

<script>
import { AppHeader, AppMain } from './components'
import ResizeMixin from './mixin/ResizeHandler'

export default {
  name: 'SupLayout',
  components: {
    AppHeader,
    AppMain
  },
  mixins: [ResizeMixin],
  computed: {
    classObj() {
      return {
        mobile: this.device === 'mobile'
      }
    }
  },
}
</script>

<style rel="stylesheet/scss" lang="scss" scoped>
  @import "src/styles/mixin.scss";
  .app-wrapper {
    @include clearfix;
    position: relative;
    height: 100%;
    width: 100%;
    &.mobile.openSidebar{
      position: fixed;
      top: 0;
    }
  }
  .drawer-bg {
    background: #000;
    opacity: 0.3;
    width: 100%;
    top: 0;
    height: 100%;
    position: absolute;
    z-index: 999;
  }
  .el-scrollbar{
    height: calc(100vh - 80px);
  }
</style>
