AppMain.vue 734 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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 >
  19. .app-container{
  20. background:#fff;
  21. position: relative;
  22. }
  23. </style>
  24. <style scoped>
  25. .app-main {
  26. /*50 = navbar */
  27. min-height: calc(100vh - 50px);
  28. width: 100%;
  29. position: relative;
  30. overflow: hidden;
  31. background:#F4F4F4
  32. }
  33. .fixed-header+.app-main {
  34. padding-top: 50px;
  35. }
  36. </style>
  37. <style lang="scss">
  38. // fix css style bug in open el-dialog
  39. .el-popup-parent--hidden {
  40. .fixed-header {
  41. padding-right: 15px;
  42. }
  43. }
  44. </style>