提交 | 用户 | 时间
|
0ca254
|
1 |
<template> |
A |
2 |
<section class="app-main"> |
|
3 |
<transition name="fade-transform" mode="out-in"> |
|
4 |
<keep-alive :include="cachedViews"> |
|
5 |
<router-view v-if="!$route.meta.link" :key="key" /> |
|
6 |
</keep-alive> |
|
7 |
</transition> |
|
8 |
<iframe-toggle /> |
|
9 |
</section> |
|
10 |
</template> |
|
11 |
|
|
12 |
<script> |
|
13 |
import iframeToggle from "./IframeToggle/index" |
|
14 |
|
|
15 |
export default { |
|
16 |
name: 'AppMain', |
|
17 |
components: { iframeToggle }, |
|
18 |
computed: { |
|
19 |
cachedViews() { |
|
20 |
return this.$store.state.tagsView.cachedViews |
|
21 |
}, |
|
22 |
key() { |
|
23 |
return this.$route.path |
|
24 |
} |
|
25 |
} |
|
26 |
} |
|
27 |
</script> |
|
28 |
|
|
29 |
<style lang="scss" scoped> |
|
30 |
.app-main { |
|
31 |
/* 50= navbar 50 */ |
|
32 |
min-height: calc(100vh - 50px); |
|
33 |
width: 100%; |
|
34 |
position: relative; |
|
35 |
overflow: hidden; |
|
36 |
} |
|
37 |
|
|
38 |
.fixed-header + .app-main { |
|
39 |
padding-top: 50px; |
|
40 |
} |
|
41 |
|
|
42 |
.hasTagsView { |
|
43 |
.app-main { |
|
44 |
/* 84 = navbar + tags-view = 50 + 34 */ |
|
45 |
min-height: calc(100vh - 84px); |
|
46 |
} |
|
47 |
|
|
48 |
.fixed-header + .app-main { |
|
49 |
padding-top: 84px; |
|
50 |
} |
|
51 |
} |
|
52 |
</style> |
|
53 |
|
|
54 |
<style lang="scss"> |
|
55 |
// fix css style bug in open el-dialog |
|
56 |
.el-popup-parent--hidden { |
|
57 |
.fixed-header { |
|
58 |
padding-right: 6px; |
|
59 |
} |
|
60 |
} |
|
61 |
|
|
62 |
::-webkit-scrollbar { |
|
63 |
width: 6px; |
|
64 |
height: 6px; |
|
65 |
} |
|
66 |
|
|
67 |
::-webkit-scrollbar-track { |
|
68 |
background-color: #f1f1f1; |
|
69 |
} |
|
70 |
|
|
71 |
::-webkit-scrollbar-thumb { |
|
72 |
background-color: #c0c0c0; |
|
73 |
border-radius: 3px; |
|
74 |
} |
|
75 |
</style> |