AppMain.vue 678 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <template>
  2. <section class="app-main">
  3. <transition name="fade-transform" mode="out-in">
  4. <keep-alive>
  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. key() {
  15. return this.$route.path
  16. }
  17. }
  18. }
  19. </script>
  20. <style scoped>
  21. .app-main {
  22. /*50 = navbar */
  23. min-height: calc(100vh - 50px);
  24. width: 100%;
  25. position: relative;
  26. overflow: hidden;
  27. }
  28. .fixed-header+.app-main {
  29. padding-top: 50px;
  30. }
  31. </style>
  32. <style lang="scss">
  33. // fix css style bug in open el-dialog
  34. .el-popup-parent--hidden {
  35. .fixed-header {
  36. padding-right: 15px;
  37. }
  38. }
  39. </style>