<template>
    <view class="pic-comp-container">
        <image class="picComp" :src="src" mode="aspectFill" @click="click"></image>
    </view>
</template>
<script>
export default {
    props: {
        src: {
            type: String,
            default: ''
        }
    },
    methods: {
        click() {
            this.$emit('needPreviewPic', this.src)
        }
    }
}
</script>
<style scoped>
.pic-comp-container {
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    overflow: hidden;
    border-radius: 30rpx;
}

.picComp {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
}
</style>
