cell-image.vue 704 Bytes
<template>
    <div>
        <a :href="productUrl" target="_blank">
            <img class="cell-img" :src="src" target = "_blank">
        </a>
    </div>
</template>

<script>
    import _ from 'lodash';

    export default {
        name: 'cell-image',
        props: {
            imageSrc: {
                type: String
            },

            productUrl: {
                type: String
            }
        },
        data() {
            return {
                src: ''
            };
        },
        created() {
            this.src = _.replace(this.imageSrc, 'http:', '');
        }
    };
</script>

<style lang="scss" scoped>
    .cell-img {
        max-width: 200px;
    }
</style>