AppMain.vue
661 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<template>
<section class="app-main">
<transition name="fade-transform" mode="out-in">
<router-view :key="key" />
</transition>
</section>
</template>
<script>
export default {
name: 'AppMain',
data() {
return {
visible: true
}
},
computed: {
key() {
return this.$route.fullPath
}
}
}
</script>
<style scoped>
.app-main {
/* height: calc(100% - 35px); */
padding: 24px 24px 0 24px;
background-color: #f0f2f5;
}
/* 定义过渡时间 */
.fade-transform-enter-active,
.fade-transform-live-active {
transition: all 0.5s;
}
.fade-transform-enter,
.fade-transform-live-to {
opacity: 0;
}
</style>