blob: 64ecff8203e0674f240e8e25e278d813927849ea [file] [log] [blame]
huibing.xie1f1606f2018-08-20 15:46:55 +08001<template>
2 <section class="app-main">
3 <transition name="fade" mode="out-in">
4 <!-- <router-view :key="key"></router-view> -->
5 <keep-alive :include="cachedViews">
6 <router-view :key="key"></router-view>
7 </keep-alive>
8 </transition>
9 </section>
10</template>
11
12<script>
13export default {
14 name: 'AppMain',
15 computed: {
16 cachedViews() {
17 return this.$store.state.tagsView.cachedViews
18 },
19 key() {
20 return this.$route.fullPath
21 }
22 }
23}
24</script>
25
26<style scoped>
27.app-main {
28 /*50 = navbar */
29 min-height: calc(100vh - 84px);
30 position: relative;
31 overflow: hidden;
32}
33</style>