<template>
    <header>
        <div>{{ title }}</div>
        <div>
            <el-link @click="reload">【刷新】</el-link>
            <el-link @click="$router.back()" v-if="prev">【返回上一页】</el-link>
        </div>
    </header>
</template>

<script>
export default {
    inject: ['reload'],
    props: {
        title: { type: String, default: '' },
        prev: { type: Boolean, default: true }
    }
}
</script>

<style lang="less" scoped>
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 18px;
    padding: 10px 15px;
    border-bottom: 1px solid #DCDFE6;
    .el-link {
        color: #909399;
    }
}
</style>
