AppMain.vue 745 B

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