<template>
  <el-image 
    style="width: 100px; height: 100px"
    :src="imgUrl" 
    :preview-src-list="imgList">
  </el-image>
</template>

<script>
export default {
  name: "ImagePreview",
  props: ['imageValue'],
  data() {
		return {
			imgUrl: '',
      imgList: []
		}
	},
  watch: {
    imageValue: {
      handler(val) {
        if (val) {
          console.log("val",val);
          this.imgUrl=val;
          this.imgList.push(val);
     
        } else {
          this.imgList = [];
          return [];
        }
      },
      deep: true,
      immediate: true,
    },
  },

};
</script>

<style lang="scss" scoped>

</style>
