AppMain.vue 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <!--
  2. * @Author: error: error: git config user.name & please set dead value or install git && error: git config user.email & please set dead value or install git & please set dead value or install git
  3. * @Date: 2022-07-01 17:39:58
  4. * @LastEditors: error: error: git config user.name & please set dead value or install git && error: git config user.email & please set dead value or install git & please set dead value or install git
  5. * @LastEditTime: 2023-06-13 10:29:28
  6. * @FilePath: \agentManage\src\layout\components\AppMain.vue
  7. * @Description:
  8. *
  9. * Copyright (c) 2023 by ${git_name_email}, All Rights Reserved.
  10. -->
  11. <template>
  12. <section class="app-main">
  13. <transition name="fade-transform" mode="out-in">
  14. <keep-alive>
  15. <router-view :key="key" />
  16. </keep-alive>
  17. </transition>
  18. </section>
  19. </template>
  20. <script>
  21. export default {
  22. name: 'AppMain',
  23. computed: {
  24. key() {
  25. return this.$route.path
  26. }
  27. }
  28. }
  29. </script>
  30. <style scoped>
  31. .app-main {
  32. /*50 = navbar */
  33. height: calc(100vh - 50px);
  34. width: 100%;
  35. position: relative;
  36. overflow: auto;
  37. }
  38. .fixed-header+.app-main {
  39. padding-top: 50px;
  40. }
  41. </style>
  42. <style lang="scss">
  43. // fix css style bug in open el-dialog
  44. .el-popup-parent--hidden {
  45. .fixed-header {
  46. padding-right: 15px;
  47. }
  48. }
  49. </style>