PageHeader.vue 1009 Bytes
Newer Older
wb-ct393452's avatar
wb-ct393452 committed
1 2
<template>
    <div :class="['page-header', layout, pageWidth]">
3 4 5 6 7
        <a-breadcrumb>
            <a-breadcrumb-item :key="index" v-for="(item, index) in breadcrumb">
                <span>{{ item }}</span>
            </a-breadcrumb-item>
        </a-breadcrumb>
wb-ct393452's avatar
wb-ct393452 committed
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
    </div>
</template>

<script>
import { mapState } from 'vuex';
export default {
    name: 'PageHeader',
    props: {
        title: {
            type: [String, Boolean],
            required: false,
        },
        breadcrumb: {
            type: Array,
            required: false,
        },
        logo: {
            type: String,
            required: false,
        },
        avatar: {
            type: String,
            required: false,
        },
    },
    computed: {
        ...mapState('settingModule', ['layout', 'showPageTitle', 'pageWidth']),
    },
};
</script>

<style lang="less" scoped>
.page-header {
    padding: 16px 24px;
42

wb-ct393452's avatar
wb-ct393452 committed
43 44 45 46 47 48
    &.head.fixed {
        margin: auto;
        max-width: 1400px;
    }
}
</style>