long
2021-12-08 bf97988edfb77f5436d4ef20575e9f34477f36a7
提交 | 用户 | age
2a61f6 1 <template>
L 2   <section class="app-main">
3     <transition name="fade-transform" mode="out-in">
ad3cc5 4       <div>
L 5         <keep-alive>
6           <router-view v-if="$route.meta.keepAlive" :key="key" />
7         </keep-alive>
8         <router-view v-if="!$route.meta.keepAlive" :key="key" />
9       </div>
2a61f6 10     </transition>
L 11   </section>
12 </template>
13
14 <script>
15 export default {
16   name: 'AppMain',
17   computed: {
18     key() {
19       return this.$route.path
20     }
21   }
22 }
23 </script>
24
25 <style scoped>
26 .app-main {
27   /*50 = navbar  */
28   min-height: calc(100vh - 50px);
29   width: 100%;
30   position: relative;
31   overflow: hidden;
32 }
33 .fixed-header+.app-main {
34   padding-top: 50px;
35 }
36 </style>
37
38 <style lang="scss">
39 // fix css style bug in open el-dialog
40 .el-popup-parent--hidden {
41   .fixed-header {
42     padding-right: 15px;
43   }
44 }
45 </style>