<template>
    <div class="img-flex">
        <el-image 
        :src="urlVal(item)"
        :preview-src-list="[urlVal(item)]" alt="" v-for="item in fileList" :key="item"/>
    </div>
</template>
<script>
const baseUrl = process.env.VUE_APP_API_BASE_URL + "/";
export default {
    props:['src'],
    data() {
        return {}
    },
    created() {
        console.log(this.src)
    },
    computed: {
        fileList:function(v){
            return this.src?this.src.split(","):[]
        }
    },
    methods: {
        urlVal(val){
            console.log(val,"2222")
            return val.indexOf("http") == -1 ? baseUrl + val : val
        }
    },
}
</script>
<style lang="less" scoped>
.img-flex{
    overflow: hidden;
    display: inline-block;
    vertical-align: middle;
    .el-image{
        width: 50px;
        float: left;
        border:1px solid #ddd;
        margin: 2px;
    }
}
</style>