<template>
    <header>
        <div class="l-content">
            <el-button size="mini" icon="el-icon-menu"></el-button>
        </div>
        <div class="r-content">
            <el-dropdown trigger="click">
                <img :src="userImg" class="user-img">
                <el-dropdown-menu slot="dropdown">
                    <el-dropdown-item>个人中心</el-dropdown-item>
                    <el-dropdown-item>退出登录</el-dropdown-item>
                </el-dropdown-menu>
            </el-dropdown>
        </div>
    </header>
</template>

<script>
export default {
    data() {
        return {
            userImg:require('../assets/images/head-img.jpg')
        }
    }
}
</script>

<style lang="less" scoped>
header{
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}
.l-content{
    display: flex;
    align-items: center;
    .el-button{
        margin-right: 15px;
    }
}
.r-content{
    .user-img{
        width: 40px;
        height: 40px;
        border-radius: 50%;
    }
}
</style>