提交 | 用户 | 时间
|
a57dc2
|
1 |
<template> |
W |
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> |
44f5fa
|
13 |
import iframeToggle from "./IframeToggle/index"; |
a57dc2
|
14 |
|
W |
15 |
export default { |
44f5fa
|
16 |
name: "AppMain", |
a57dc2
|
17 |
components: { iframeToggle }, |
W |
18 |
computed: { |
|
19 |
cachedViews() { |
44f5fa
|
20 |
return this.$store.state.tagsView.cachedViews; |
a57dc2
|
21 |
}, |
W |
22 |
key() { |
44f5fa
|
23 |
return this.$route.path; |
W |
24 |
}, |
|
25 |
}, |
|
26 |
}; |
a57dc2
|
27 |
</script> |
W |
28 |
|
|
29 |
<style lang="scss" scoped> |
|
30 |
.app-main { |
|
31 |
/* 50= navbar 50 */ |
44f5fa
|
32 |
height: calc(100vh - 84px); |
a57dc2
|
33 |
width: 100%; |
W |
34 |
} |
|
35 |
|
|
36 |
.fixed-header + .app-main { |
|
37 |
padding-top: 50px; |
|
38 |
} |
|
39 |
|
|
40 |
.hasTagsView { |
|
41 |
.app-main { |
|
42 |
/* 84 = navbar + tags-view = 50 + 34 */ |
|
43 |
min-height: calc(100vh - 84px); |
|
44 |
} |
|
45 |
|
|
46 |
.fixed-header + .app-main { |
|
47 |
padding-top: 84px; |
|
48 |
} |
|
49 |
} |
|
50 |
</style> |
|
51 |
|
|
52 |
<style lang="scss"> |
|
53 |
// fix css style bug in open el-dialog |
|
54 |
.el-popup-parent--hidden { |
|
55 |
.fixed-header { |
|
56 |
padding-right: 6px; |
|
57 |
} |
|
58 |
} |
|
59 |
|
|
60 |
::-webkit-scrollbar { |
|
61 |
width: 6px; |
|
62 |
height: 6px; |
|
63 |
} |
|
64 |
|
|
65 |
::-webkit-scrollbar-track { |
|
66 |
background-color: #f1f1f1; |
|
67 |
} |
|
68 |
|
|
69 |
::-webkit-scrollbar-thumb { |
|
70 |
background-color: #c0c0c0; |
|
71 |
border-radius: 3px; |
|
72 |
} |
|
73 |
</style> |