AppMain.vue 637 Bytes
Newer Older
Pan's avatar
Pan committed
1
<template>
Pan's avatar
Pan committed
2
  <section class="app-main">
Pan's avatar
Pan committed
3
    <transition name="fade-transform" mode="out-in">
花裤衩's avatar
花裤衩 committed
4
      <router-view :key="key" />
Pan's avatar
Pan committed
5 6
    </transition>
  </section>
Pan's avatar
Pan committed
7 8 9
</template>

<script>
Pan's avatar
Pan committed
10 11 12
export default {
  name: 'AppMain',
  computed: {
花裤衩's avatar
花裤衩 committed
13
    key() {
14
      return this.$route.path
花裤衩's avatar
花裤衩 committed
15
    }
Pan's avatar
Pan committed
16 17
  }
}
Pan's avatar
Pan committed
18
</script>
19 20 21 22 23

<style scoped>
.app-main {
  /*50 = navbar  */
  min-height: calc(100vh - 50px);
花裤衩's avatar
花裤衩 committed
24
  width: 100%;
25 26 27
  position: relative;
  overflow: hidden;
}
花裤衩's avatar
花裤衩 committed
28 29
.fixed-header+.app-main {
  padding-top: 50px;
30 31 32 33 34 35 36 37 38
}
</style>

<style lang="scss">
// fix css style bug in open el-dialog
.el-popup-parent--hidden {
  .fixed-header {
    padding-right: 15px;
  }
花裤衩's avatar
花裤衩 committed
39
}
40
</style>