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

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

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

<style rel="stylesheet/scss" lang="scss" scoped>
  .app-wrapper {
    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 + 17px);*/
    height: 100vh;
  }
</style>

<style>
<!-- 隐藏横向的滚动条 -->
  .el-scrollbar__wrap {
    overflow-x: hidden !important;
  }
</style>
