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.
 
 
 
 

42 lines
795 B

<template>
<div style="margin: -24px -24px 0px">
<page-header :breadcrumb="breadcrumb" :title="title">
<div slot="content">{{desc}}</div>
</page-header>
<div style="margin: 24px 24px 0px">
<router-view ref="page"/>
</div>
</div>
</template>
<script>
import PageHeader from '../page/PageHeader'
export default {
name: 'PageLayout',
components: {PageHeader},
data () {
return {
title: '',
breadcrumb: [],
desc: ''
}
},
mounted () {
this.getPageHeaderInfo()
},
beforeUpdate () {
this.getPageHeaderInfo()
},
methods: {
getPageHeaderInfo () {
this.title = this.$route.name
this.breadcrumb = this.$route.matched
this.desc = this.$refs.page.desc
}
}
}
</script>
<style scoped>
</style>