AppMain.vue 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <!--
  2. * @Description:
  3. * @Author: transparent
  4. * @Date: 2023-07-14 21:19:03
  5. * @LastEditTime: 2023-11-02 10:47:27
  6. * @LastEditors: transparent
  7. * @FilePath: /ngfrontend/src/layout/components/AppMain.vue
  8. -->
  9. <template>
  10. <section class="app-main">
  11. <transition name="fade-transform" mode="out-in">
  12. <!-- <keep-alive :include="cachedViews">-->
  13. <router-view :key="key" />
  14. <!-- </keep-alive>-->
  15. </transition>
  16. </section>
  17. </template>
  18. <script>
  19. export default {
  20. name: 'AppMain',
  21. computed: {
  22. cachedViews() {
  23. return this.$store.state.tagsView.cachedViews
  24. },
  25. key() {
  26. return this.$route.path
  27. }
  28. }
  29. }
  30. </script>
  31. <style lang="scss" scoped>
  32. .app-main {
  33. /* 50= navbar 50 */
  34. min-height: calc(100vh - 50px);
  35. width: 100%;
  36. position: relative;
  37. // overflow: hidden;
  38. }
  39. .fixed-header+.app-main {
  40. padding-top: 50px;
  41. }
  42. .hasTagsView {
  43. .app-main {
  44. /* 84 = navbar + tags-view = 50 + 34 */
  45. min-height: calc(100vh - 84px);
  46. }
  47. .fixed-header+.app-main {
  48. padding-top: 84px;
  49. }
  50. }
  51. </style>
  52. <style lang="scss">
  53. // fix css style bug in open el-dialog
  54. .el-popup-parent--hidden {
  55. .fixed-header {
  56. padding-right: 15px;
  57. }
  58. }
  59. </style>