123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- <template>
- <section class="app-main">
- <transition name="fade-transform" mode="out-in">
- <keep-alive :include="cachedViews">
- <router-view :key="key" />
- </keep-alive>
- </transition>
- <span class="footer">
- Copyright
- </span>
- </section>
- </template>
- <script>
- export default {
- name: 'AppMain',
- computed: {
- cachedViews() {
- return this.$store.state.tagsView.cachedViews
- },
- key() {
- return this.$route.path
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- @import "~@/styles/variables.scss";
- .app-main {
- min-height: calc(100vh - #{$headerHeight});
- width: 100%;
- position: relative;
- overflow: auto;
- padding-bottom: $footerHeight;
- &>div:not(.home-container) {
- height: calc(100vh - #{$layoutHeight});
- padding: 10px 0 0 10px;
- }
- }
- .hasTagsView {
- .app-main {
- min-height: calc(100vh - #{$headerHeight} - #{$tagHeight});
- }
- .fixed-header+.app-main {
- min-height: calc(100vh - #{$headerHeight});
- padding-top: $tagHeight;
- }
- }
- .footer {
- display: block;
- width: 100%;
- height: $footerHeight;
- line-height: $footerHeight;
- font-size: 12px;
- color: rgba(0,0,0,0.45);
- text-align: center;
- position: absolute;
- left: 0;
- bottom: 0;
- }
- </style>
- <style lang="scss">
- // fix css style bug in open el-dialog
- .el-popup-parent--hidden {
- .fixed-header {
- padding-right: 15px;
- }
- }
- </style>
|