<template>
  <section class="app-main">
    <transition name="fade-transform" mode="out-in">
      <keep-alive :include="['flowList']">
        <router-view :key="key" />
      </keep-alive>
    </transition>
  </section>
</template>

<script>
export default {
  name: 'AppMain',
  computed: {
    key() {
      return this.$route.fullPath
    }
  }
}
</script>

<style scoped>
.app-main {
  /*50 = navbar  */
  min-height: calc(100vh);
  width: 100%;
  background: #eff2f9;
  position: relative;
  overflow: hidden;
  padding: 20px;
}
.fixed-header+.app-main {
  padding-top: 50px;
}
@media (max-width: 768px) {
  .app-main {
    min-height: calc(100vh);
    padding: 10px;
  }
}
</style>

<style lang="scss">
// fix css style bug in open el-dialog
.el-popup-parent--hidden {
  .fixed-header {
    padding-right: 15px;
  }
}
</style>
