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