8dda8b2bcc18fc55f37e1334112bb32601c82c01.svn-base 825 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <template>
  2. <section class="app-main">
  3. <transition name="fade-transform" mode="out-in">
  4. <keep-alive :include="cachedViews">
  5. <router-view :key="key" />
  6. </keep-alive>
  7. </transition>
  8. </section>
  9. </template>
  10. <script>
  11. export default {
  12. name: 'AppMain',
  13. computed: {
  14. cachedViews() {
  15. return this.$store.state.tagsView.cachedViews
  16. },
  17. key() {
  18. return this.$route.path
  19. }
  20. }
  21. }
  22. </script>
  23. <style scoped>
  24. .app-main {
  25. /*50 = navbar */
  26. min-height: calc(100vh - 84px);
  27. width: 100%;
  28. position: relative;
  29. overflow: hidden;
  30. }
  31. .fixed-header+.app-main {
  32. padding-top: 84px;
  33. }
  34. </style>
  35. <style lang="scss">
  36. // fix css style bug in open el-dialog
  37. .el-popup-parent--hidden {
  38. .fixed-header {
  39. padding-right: 15px;
  40. }
  41. }
  42. </style>