AppMain.vue 644 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <template>
  2. <section class="app-main">
  3. <transition name="fade-transform" mode="out-in">
  4. <keep-alive :include="cachedViews">
  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. cachedViews() {
  15. return this.$store.state.tagsView.cachedViews
  16. },
  17. key() {
  18. return this.$route.fullPath
  19. }
  20. }
  21. }
  22. </script>
  23. <style lang="scss" scoped>
  24. @import '@/styles/transition.scss';
  25. .app-main{
  26. position: absolute;
  27. top: 0px;
  28. bottom: 0px;
  29. left:5px;
  30. right:0px;
  31. overflow-y: scroll;
  32. overflow-x: hidden;
  33. }
  34. </style>