-
Notifications
You must be signed in to change notification settings - Fork 961
/
PageView.vue
55 lines (52 loc) · 1.18 KB
/
PageView.vue
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<template>
<page-layout :desc="desc" :linkList="linkList">
<div v-if="this.extraImage && !isMobile" slot="extra" class="extraImg">
<img :src="extraImage"/>
</div>
<page-toggle-transition :disabled="animate.disabled" :animate="animate.name" :direction="animate.direction">
<router-view ref="page" />
</page-toggle-transition>
</page-layout>
</template>
<script>
import PageLayout from './PageLayout'
import PageToggleTransition from '../components/transition/PageToggleTransition';
import {mapState} from 'vuex'
export default {
name: 'PageView',
components: {PageToggleTransition, PageLayout},
data () {
return {
page: {}
}
},
computed: {
...mapState('setting', ['isMobile', 'multiPage', 'animate']),
desc() {
return this.page?.desc
},
linkList() {
return this.page?.linkList
},
extraImage() {
return this.page?.extraImage
}
},
mounted () {
this.page = this.$refs.page
},
updated () {
this.page = this.$refs.page
}
}
</script>
<style lang="less" scoped>
.extraImg{
margin-top: -60px;
text-align: center;
width: 195px;
img{
width: 100%;
}
}
</style>