Blame view

src/layout/index.vue 1.1 KB
任超 committed
1 2
<template>
  <div class="app-wrapper">
3
    <navbar />
任超 committed
4
    <div class="appMain">
5 6
      <app-main />
    </div>
任超 committed
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
  </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%;
39
  min-width: 1280px;
任超 committed
40 41 42 43
  background: url('~@/image/bg.png') no-repeat;
  background-size: 100% 100%;
  padding: 12px;
  box-sizing: border-box;
任超 committed
44 45 46 47 48 49 50

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

任超 committed
51
.appMain {
52
  min-width: 1290px;
xiaomiao committed
53
  height: calc(100vh - 101px) !important;
任超 committed
54
  box-sizing: border-box;
任超 committed
55 56 57 58

  .app-main {
    height: 100%;
  }
任超 committed
59 60
}
</style>