AppMain.vue 637 B

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