AppMain.vue 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <template>
  2. <section class="app-main">
  3. <transition name="fade-transform" mode="out-in">
  4. <keep-alive :include="cachedViews">
  5. <router-view v-if="!$route.meta.link" :key="key" />
  6. </keep-alive>
  7. </transition>
  8. <iframe-toggle />
  9. </section>
  10. </template>
  11. <script>
  12. import iframeToggle from "./IframeToggle/index"
  13. export default {
  14. name: 'AppMain',
  15. components: { iframeToggle },
  16. computed: {
  17. cachedViews() {
  18. return this.$store.state.tagsView.cachedViews
  19. },
  20. key() {
  21. return this.$route.path
  22. }
  23. }
  24. }
  25. </script>
  26. <style lang="scss" >
  27. .app-main {
  28. /* 50= navbar 50 */
  29. min-height: calc(100vh - 50px);
  30. //+++++++++++
  31. width: 100%;
  32. position: relative;
  33. overflow: hidden;
  34. }
  35. .fixed-header + .app-main {
  36. padding-top: 50px;
  37. }
  38. .hasTagsView {
  39. .app-main {
  40. /* 84 = navbar + tags-view = 50 + 34 */
  41. min-height: calc(100vh - 84px);
  42. //+++++++++++
  43. /* position:fixed; */
  44. }
  45. .fixed-header + .app-main {
  46. padding-top: 84px;
  47. }
  48. }
  49. </style>
  50. <style lang="scss">
  51. // fix css style bug in open el-dialog
  52. .el-popup-parent--hidden {
  53. .fixed-header {
  54. padding-right: 6px;
  55. }
  56. }
  57. ::-webkit-scrollbar {
  58. width: 6px;
  59. height: 6px;
  60. }
  61. ::-webkit-scrollbar-track {
  62. background-color: #f1f1f1;
  63. }
  64. ::-webkit-scrollbar-thumb {
  65. background-color: #c0c0c0;
  66. border-radius: 3px;
  67. }
  68. </style>