<template>
  <img :class="{'object-top sm:object-center': existSource}" :src="setImage()"
       alt=""
  />
</template>

<script>
export default {
    components: {},
    props: {
        source: String,
        type: String,
    },
    computed: {
        existSource () {
            return !this.source
        }
    },
    methods: {
        setImage() {
            if (this.source) {
                return this.source
            }
            // if(this.type == 'music'){
            //     return '/image/modalimg1.jpg'
            // }
            // return '/image/card4.jpg'
            return '/image/default-placeholder.jpg'
        },
    }
}
</script>
