vue+antd 后台管理框架
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

63 lines
1.2 KiB

<template>
<page-layout :desc="desc" :title="title" :linkList="linkList">
<div slot="extra" class="extraImg">
<img :src="extraImage"/>
</div>
<transition name="page-toggle">
<keep-alive v-if="multiPage">
<router-view ref="page" />
</keep-alive>
<router-view ref="page" v-else />
</transition>
</page-layout>
</template>
<script>
import PageLayout from './PageLayout'
export default {
name: 'PageView',
components: {PageLayout},
data () {
return {
title: '',
desc: '',
linkList: [],
extraImage: ''
}
},
computed: {
multiPage () {
return this.$store.state.setting.multiPage
}
},
mounted () {
this.getPageHeaderInfo()
},
updated () {
this.getPageHeaderInfo()
},
methods: {
getPageHeaderInfo () {
this.title = this.$route.name
const page = this.$refs.page
if (page) {
this.desc = page.desc
this.linkList = page.linkList
this.extraImage = page.extraImage
}
}
}
}
</script>
<style lang="less" scoped>
.extraImg{
margin-top: -60px;
text-align: center;
width: 195px;
img{
width: 100%;
}
}
</style>