<template>
    <div class="item" v-if="data">
        <div class="sec">
            <i :class="data.icon"></i>
        </div>
        <div class="info">
            <div class="name">{{data.name}}</div>
            <div class="value" :class="{'point':'1'==='1'}" @click="data.value==='查看'&&showVideos()">{{data.value}}</div>
        </div>
    </div>
</template>

<script>
export default {
    props: ['data'],
    methods:{
        showVideos(){
            this.$emit('showVideos')
        }
    }
}
</script>

<style lang="scss" scoped>
    .point {
        cursor: pointer;
    }
.item {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 15px;
    border: 1px solid #F5F5F5;
    .sec {
        font-size: 40px;
    }
    .info {
        margin-left: 8px;
        display: flex;
        flex-direction: column;
        .name {
            color: #878787;
            font-size: 14px;
        }
        .value {
            color: #343434;
            font-size: 18px;
            font-weight: bolder;
        }
    }
}
</style>