AppMain.vue 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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.path
  19. }
  20. }
  21. }
  22. </script>
  23. <style lang="scss" scoped>
  24. .app-main {
  25. /* 50= navbar 50 */
  26. min-height: calc(100vh - 50px);
  27. // min-width: 1270px;
  28. min-width: 847px;
  29. width: 100%;
  30. position: relative;
  31. overflow: hidden;
  32. background: #2d3a48;
  33. }
  34. .fixed-header+.app-main {
  35. padding-top: 50px;
  36. }
  37. .hasTagsView {
  38. .app-main {
  39. /* 84 = navbar + tags-view = 50 + 34 */
  40. min-height: calc(100vh - 84px);
  41. }
  42. .fixed-header+.app-main {
  43. padding-top: 84px;
  44. }
  45. }
  46. </style>
  47. <style lang="scss">
  48. // fix css style bug in open el-dialog
  49. .el-popup-parent--hidden {
  50. .fixed-header {
  51. padding-right: 15px;
  52. }
  53. }
  54. </style>