<template>
  <el-image style="width: 60px; height: 60px" :src="value" fit="contain" />
  <!-- <img :src=value class="goodsImg" /> -->
</template>

<script setup>
  import { computed,getCurrentInstance,nextTick  } from "vue";
  const { proxy } = getCurrentInstance();
  const value = ref('')
  const config = ref({})
  const emit = defineEmits();
  const props = defineProps({
    propConfig:{},
    propValue:{},
    parentValue:{}
  })

  const setValue = data => {
    if(data){
      try{
        let v= JSON.parse(data);
        value.value = v[0]
      }catch(e){
        value.value = data
      }
    }
    
  }

  defineExpose({
    setValue
  })

  if(props.propValue){
    setValue(props.propValue)
  }
</script>

<style lang="scss" scoped>
.goodsImg{
  max-height: 600px;
  max-width: 100%;
}
</style>