12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- <template>
- <section class="app-main">
- <transition name="fade-transform" mode="out-in">
- <keep-alive :include="cachedViews">
- <router-view :key="key" />
- </keep-alive>
- </transition>
- </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/mixin.scss";
- // @import "~@/styles/sidebar.scss";
- @import "~@/styles/variables.scss";
- @import "~@/styles/mixin.scss";
- @import "~@/styles/transition.scss";
- @import "~@/styles/element-ui.scss";
- @import "~@/styles/sidebar.scss";
- @import "~@/styles/btn.scss";
- .app-main {
- /* 50= navbar 50 */
- min-height: 100%;
- //calc(100vh - 50px);
- width: 100%;
- height: 100%;
- position: relative;
- overflow: scroll;
- padding: 0 0 0 0;
- box-sizing: border-box;
- @include scrollBar();
- }
- .fixed-header + .app-main {
-
- // min-height: calc(100vh - 50px);
- min-height: 100%;
- //calc(100vh - 50px);
- width: 100%;
- height: 100%;
- position: relative;
- overflow: scroll;
- padding: 0 0 0 0;
- padding-top: 50px;
- box-sizing: border-box;
- @include scrollBar();
- }
- .hasTagsView {
- .app-main {
- /* 84 = navbar + tags-view = 50 + 34 */
- min-height: 100%;
- min-height: 100%;
- //calc(100vh - 50px);
- width: 100%;
- height: 100%;
- position: relative;
- overflow: scroll;
- padding: 0 0 0 0;
- box-sizing: border-box;
- padding-top: 50px;
- @include scrollBar();
- }
- // .fixed-header+.app-main {
- // padding-top: 84px;
- // }
- }
- </style>
- <style lang="scss">
- // fix css style bug in open el-dialog
- .el-popup-parent--hidden {
- .fixed-header {
- padding-right: 15px;
- }
- }
- </style>
|