AppMain.vue 791 B

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