2019-10-08 09:14:38 +08:00
|
|
|
<template>
|
|
|
|
<section class="app-main">
|
|
|
|
<transition name="fade-transform" mode="out-in">
|
2020-12-16 20:57:48 +08:00
|
|
|
<keep-alive :include="cachedViews">
|
2019-10-08 09:14:38 +08:00
|
|
|
<router-view :key="key" />
|
|
|
|
</keep-alive>
|
|
|
|
</transition>
|
|
|
|
</section>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
name: 'AppMain',
|
|
|
|
computed: {
|
2020-12-16 20:57:48 +08:00
|
|
|
cachedViews() {
|
|
|
|
return this.$store.state.tagsView.cachedViews
|
2019-10-08 09:14:38 +08:00
|
|
|
},
|
|
|
|
key() {
|
2020-12-16 20:57:48 +08:00
|
|
|
return this.$route.path
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2019-10-08 09:14:38 +08:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
.app-main {
|
|
|
|
/* 50= navbar 50 */
|
|
|
|
min-height: calc(100vh - 50px);
|
|
|
|
width: 100%;
|
|
|
|
position: relative;
|
|
|
|
overflow: hidden;
|
|
|
|
}
|
|
|
|
|
2020-12-16 20:57:48 +08:00
|
|
|
.fixed-header+.app-main {
|
2019-10-08 09:14:38 +08:00
|
|
|
padding-top: 50px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.hasTagsView {
|
|
|
|
.app-main {
|
|
|
|
/* 84 = navbar + tags-view = 50 + 34 */
|
|
|
|
min-height: calc(100vh - 84px);
|
|
|
|
}
|
|
|
|
|
2020-12-16 20:57:48 +08:00
|
|
|
.fixed-header+.app-main {
|
2019-10-08 09:14:38 +08:00
|
|
|
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>
|