<template>
    <div class="container">
        <div class="top"></div>
        <!-- <img class="top" :src="userInfo.avatar" alt="" /> -->
        <div class="top1">
            <div class="title" @click="all('/fans')">
                <div class="title1">{{ userInfo.follows }}</div>
                <div class="title2" :class="{ active }">粉丝</div>
            </div>
            <img class="img2" :src="userInfo.avatar" alt="" />
            <div class="title">
                <div class="title1">{{ userInfo.followers }}</div>
                <div class="title2">关注</div>
            </div>
        </div>
    </div>
</template>
<script>
import { mapState } from 'vuex';
export default {
    data() {
        return {
            tabs: ['粉丝', '关注'],
            active: ''
        };
    },
    methods: {},
    computed: {
        ...mapState(['userInfo'])
    }
};
</script>
<style lang="less" scoped>
.container {
    .top {
        height: 146px;
        width: 100%;
        background: #00ffcb;
    }
    .top1 {
        display: flex;
        justify-content: center;
        position: relative;
        .title {
            text-align: center;
            cursor: pointer;
            padding: 8px 100px 0;
            .title1 {
                font-size: 22px;
                font-weight: normal;
                color: #ffffff;
                line-height: 24px;
            }
            .title2 {
                font-size: 14px;
                font-weight: 400;
                color: #939599;
                line-height: 24px;
                &.active {
                    color: red;
                }
            }
        }
        .img2 {
            position: absolute;
            width: 100px;
            height: 100px;
            border-radius: 50%;
            padding: 4px;
            background: #ffffff;
            top: -50px;
        }
    }
}
</style>
