|
|
|
@ -1,17 +1,16 @@ |
|
|
|
|
<template> |
|
|
|
|
<div style="margin: -24px -24px 0px"> |
|
|
|
|
<page-header :breadcrumb="breadcrumb" :title="title"> |
|
|
|
|
<div slot="content"> |
|
|
|
|
<template v-if="this.$slots.desc"> |
|
|
|
|
<slot name="desc"></slot> |
|
|
|
|
</template> |
|
|
|
|
<template v-else> |
|
|
|
|
{{desc}} |
|
|
|
|
<page-header :breadcrumb="breadcrumb" :title="title" :logo="avatar"> |
|
|
|
|
<slot slot="content" name="headerContent"></slot> |
|
|
|
|
<div slot="content" v-if="!this.$slots.headerContent"> |
|
|
|
|
<p style="font-size: 14px;line-height: 1.5;color: rgba(0,0,0,.65)">{{desc}}</p> |
|
|
|
|
<div class="link"> |
|
|
|
|
<template v-for="(link, index) in linkList"> |
|
|
|
|
<a :key="index" :href="link.href"><a-icon :type="link.icon" />{{link.title}}</a> |
|
|
|
|
</template> |
|
|
|
|
</div> |
|
|
|
|
<div slot="extra"> |
|
|
|
|
<slot name="extra"></slot> |
|
|
|
|
</div> |
|
|
|
|
<slot slot="extra" name="extra"></slot> |
|
|
|
|
</page-header> |
|
|
|
|
<div ref="page" style="margin: 24px 24px 0px"> |
|
|
|
|
<slot ></slot> |
|
|
|
@ -21,10 +20,11 @@ |
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
|
import PageHeader from '../page/PageHeader' |
|
|
|
|
import AIcon from 'vue-antd-ui/es/icon/icon' |
|
|
|
|
export default { |
|
|
|
|
name: 'PageLayout', |
|
|
|
|
components: {PageHeader}, |
|
|
|
|
props: ['desc', 'title'], |
|
|
|
|
components: {AIcon, PageHeader}, |
|
|
|
|
props: ['desc', 'title', 'avatar', 'linkList', 'extraImage'], |
|
|
|
|
data () { |
|
|
|
|
return { |
|
|
|
|
breadcrumb: [] |
|
|
|
@ -33,7 +33,7 @@ export default { |
|
|
|
|
mounted () { |
|
|
|
|
this.getBreadcrumb() |
|
|
|
|
}, |
|
|
|
|
beforeUpdate () { |
|
|
|
|
updated () { |
|
|
|
|
this.getBreadcrumb() |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
@ -44,6 +44,18 @@ export default { |
|
|
|
|
} |
|
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
<style scoped> |
|
|
|
|
<style lang="less" scoped> |
|
|
|
|
.link{ |
|
|
|
|
margin-top: 16px; |
|
|
|
|
line-height: 24px; |
|
|
|
|
a{ |
|
|
|
|
font-size: 14px; |
|
|
|
|
margin-right: 32px; |
|
|
|
|
i{ |
|
|
|
|
font-size: 22px; |
|
|
|
|
margin-right: 8px; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
</style> |
|
|
|
|