You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
jin_ji_hu/src/layout/components/AppMain.vue

78 lines
1.3 KiB

1 year ago
<template>
<section class="app-main">
<transition name="fade-transform" mode="out-in">
<keep-alive :include="cachedViews">
<router-view v-if="!$route.meta.link" :key="key" />
</keep-alive>
</transition>
<iframe-toggle />
</section>
</template>
<script>
import iframeToggle from "./IframeToggle/index";
1 year ago
export default {
name: "AppMain",
1 year ago
components: { iframeToggle },
computed: {
cachedViews() {
return this.$store.state.tagsView.cachedViews;
1 year ago
},
key() {
return this.$route.path;
},
},
};
1 year ago
</script>
<style lang="scss" scoped>
.app-main {
/* 50= navbar 50 */
height: calc(100vh - 98px);
1 year ago
width: 100%;
position: relative;
padding: 10px 10px 0 10px;
1 year ago
// background: #f6f7f9;
1 year ago
}
.fixed-header + .app-main {
padding-top: 50px;
}
.hasTagsView {
.app-main {
/* 84 = navbar + tags-view = 50 + 34 */
min-height: calc(100vh - 84px);
}
.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: 6px;
}
}
::-webkit-scrollbar {
width: 6px;
height: 6px;
}
::-webkit-scrollbar-track {
background-color: #f1f1f1;
}
::-webkit-scrollbar-thumb {
background-color: #c0c0c0;
border-radius: 3px;
}
</style>