AppMain.vue 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <template>
  2. <section class="app-main">
  3. <router-view v-slot="{ Component, route }">
  4. <transition name="fade-transform" mode="out-in">
  5. <keep-alive :include="tagsViewStore.cachedViews">
  6. <component v-if="!route.meta.link" :is="Component" :key="route.path"/>
  7. </keep-alive>
  8. </transition>
  9. </router-view>
  10. <iframe-toggle />
  11. </section>
  12. </template>
  13. <script setup>
  14. import iframeToggle from "./IframeToggle/index"
  15. import useTagsViewStore from '@/store/modules/tagsView'
  16. const tagsViewStore = useTagsViewStore()
  17. console.log(tagsViewStore)
  18. </script>
  19. <style lang="scss" scoped>
  20. .app-main {
  21. /* 50= navbar 50 */
  22. height: calc(100vh - 100px);
  23. width: 100%;
  24. position: relative;
  25. overflow-y: auto;
  26. }
  27. .fixed-header + .app-main {
  28. padding-top: 50px;
  29. }
  30. .hasTagsView {
  31. .app-main {
  32. /* 84 = navbar + tags-view = 50 + 34 */
  33. height: calc(100vh - 100px);
  34. }
  35. .fixed-header + .app-main {
  36. padding-top: 84px;
  37. }
  38. }
  39. </style>
  40. <style lang="scss">
  41. // fix css style bug in open el-dialog
  42. .el-popup-parent--hidden {
  43. .fixed-header {
  44. padding-right: 17px;
  45. }
  46. }
  47. </style>