AppMain.vue 827 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <template>
  2. <section class="app-main">
  3. <transition name="fade-transform" mode="out-in">
  4. <keep-alive>
  5. <router-view />
  6. </keep-alive>
  7. </transition>
  8. </section>
  9. </template>
  10. <script>
  11. export default {
  12. name: "AppMain",
  13. computed: {
  14. cachedViews() {
  15. return this.$store.state.tagsView.cachedViews;
  16. },
  17. key() {
  18. console.log(this.$route.path,'45454');
  19. return this.$route.path;
  20. },
  21. },
  22. };
  23. </script>
  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. }
  32. .fixed-header + .app-main {
  33. /* padding-top: 50px; */
  34. padding-top: 80px;
  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>