<template>
    <div class="project-info">
        <el-image :src="img" fit="cover"> </el-image>
        <div class="info">
            <div class="text1">
                <!-- <div class="tag">{{ info.reviewStatus }}{{ info.passStatus }}</div> -->
                {{ info.name }}
            </div>
            <div class="text2" v-html="info.intro"></div>

            <div class="time">
                {{ info.createdAt }}
            </div>
        </div>
    </div>
</template>

<script>
export default {
    name: 'ProjectInfo',
    props: {
        info: {
            type: Object,
            default: () => {
                return {};
            },
        },
    },
    computed: {
        img() {
            let imgs = this.info.pics ? [...this.info.pics] : [];
            return imgs.length > 0 ? imgs[0] : '';
        },
    },
};
</script>

<style lang="less" scoped>
.el-image {
    width: 140px;
    height: 140px;
    flex-shrink: 0;
}

.project-info {
    .flex();
    align-items: stretch;
    overflow: hidden;
    .info {
        flex-grow: 1;
        overflow: hidden;
        margin-left: 22px;
    }

    .text1 {
        .flex();
        .tag {
            font-size: 17px;
            font-weight: 400;
            color: #22b197;
            line-height: 31px;
            padding: 0 6px;
            margin-right: 10px;
        }

        font-size: 20px;
        font-family: PingFangSC-Regular, PingFang SC;
        font-weight: 400;
        color: #ffffff;
        line-height: 34px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .text2 {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        overflow: hidden;
        max-height: 62px;
        font-size: 16px;
        color: #ffffff;
        line-height: 31px;
        margin-top: 7px;
        /deep/ p {
            margin: 0;
        }
    }

    .time {
        font-size: 18px;
        color: #ffffff;
        line-height: 31px;
        margin-top: 6px;
    }
}
</style>
