AppMain.vue 791 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <template>
  2. <section class="app-main">
  3. <transition name="fade-transform" mode="out-in">
  4. <keep-alive max="1">
  5. <router-view />
  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 - 50px);
  27. width: 100%;
  28. position: relative;
  29. overflow: hidden;
  30. }
  31. .fixed-header + .app-main {
  32. /* padding-top: 50px; */
  33. padding-top: 80px;
  34. }
  35. </style>
  36. <style lang="scss">
  37. // fix css style bug in open el-dialog
  38. .el-popup-parent--hidden {
  39. .fixed-header {
  40. padding-right: 15px;
  41. }
  42. }
  43. </style>