Blame view

src/layout1/index.vue 1.16 KB
任超 committed
1 2 3
<template>
  <div class="app-wrapper">
    <navbar />
任超 committed
4 5
    <div class="main-container">
      <sidebar class="sidebar-container" />
任超 committed
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
      <app-main />
    </div>
  </div>
</template>
<script>
import { AppMain, Navbar, Sidebar, TagsView } from './components'
import ResizeMixin from './mixin/ResizeHandler'
import { mapState } from 'vuex'
export default {
  name: 'Layout',
  components: {
    AppMain,
    Navbar,
    Sidebar,
    TagsView
  },
  mixins: [ResizeMixin],
  computed: {
    ...mapState({
      sidebar: state => state.app.sidebar,
      needTagsView: state => state.settings.tagsView,
      fixedHeader: state => state.settings.fixedHeader
    })
  }
}
</script>
<style lang="scss" scoped>
@import "~@/styles/mixin.scss";

.app-wrapper {
  @include clearfix;
  position: relative;
  height: 100%;
  width: 100%;
任超 committed
40
  background-color: $containerbg;
任超 committed
41 42 43 44 45 46 47

  &.mobile.openSidebar {
    position: fixed;
    top: 0;
  }
}

任超 committed
48 49 50 51 52 53 54 55 56
.drawer-bg {
  background: #000;
  opacity: 0.3;
  width: 100%;
  top: 0;
  height: 100%;
  position: absolute;
  z-index: 999;
}
任超 committed
57

任超 committed
58 59 60 61 62 63 64 65
.fixed-header {
  width: 100%;
  transition: width 0.28s;
}

.el-dropdown-menu--small {
  padding: 0;
  width: 5px;
任超 committed
66 67
}
</style>