<template>
  <div class="table-img">
    <el-image style="width: 60px; height: 60px" :src="pathImg" fit="contain" />
    <!-- <img v-if="pathImg" :src="pathUrl + pathImg" /> -->
  </div>
  
</template>

<script setup>
  import { ref } from 'vue'
  const { proxy } = getCurrentInstance();

  const srcList = ref([])
  const pathUrl = ref('')
  const emit = defineEmits();
  const pathImg = ref('')
  const props = defineProps({
    propConfig:{},
    propValue:{},
    parentValue:{}
  })

  pathUrl.value = import.meta.env.VITE_APP_UPLOAD_URL
  if(props.propValue){
    try{
      let v= JSON.parse(props.propValue);
      pathImg.value = v[0];
    }catch(e){
      console.error('图片转换错误')
    }
    // pathImg.value = props.propValue
  }
</script>

<style lang="scss" scoped>
.table-img{
  height: 50px;
  width: 50px;
  border: solid 1px #EEE;
  overflow: hidden;
  display: flex;
  align-items: center;
  >img{
    width: 100%;
  }
}
</style>