代码优化,结构调整,进度50%

This commit is contained in:
zhengjie
2019-06-28 11:46:06 +08:00
parent 6c06d89355
commit 1b757d6972
54 changed files with 592 additions and 832 deletions

View File

@@ -0,0 +1,49 @@
<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.fullPath
}
}
}
</script>
<style lang="scss" scoped>
.app-main {
z-index: 88;
/*84 = navbar + tags-view = 50 +34 */
min-height: calc(100vh - 84px);
width: 100%;
position: relative;
overflow: hidden;
}
.fixed-header+.app-main {
padding-top: 50px;
}
.hasTagsView {
.app-main {
min-height: calc(100vh - 84px);
}
.fixed-header+.app-main {
padding-top: 85px;
}
}
</style>