AppMain.vue 939 B

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