PageLayout.vue 884 Bytes
<template>
  <el-container class="page-layout-container">
    <el-header>
      <!-- menu -->
      <global-header />
    </el-header>
    <el-container class="main-container">
      <el-aside width="200px">
        <sidebar />
      </el-aside>
      <el-main class="main-content">
        <router-view />
      </el-main>
    </el-container>
  </el-container>
</template>

<script>
import GlobalHeader from './components/GlobalHeader'
import Sidebar from './components/Sidebar'

export default {
  name: 'PageLayout',
  components: { GlobalHeader, Sidebar }
}
</script>

<style lang="scss" scoped>
.page-layout-container {
  width: 100%;
  height: 100%;
}
.main-container {
  margin: 0 165px;
  background-color: #e9eef3;
  color: #333;
  text-align: center;
  height: 100vh;
  line-height: 160px;
  box-shadow: 0 0 3px 0 rgba(0, 0, 0, 1);
  transition: all 0.3s linear;
}
</style>