<template>
  <div>
    <a-upload
      list-type="picture-card"
      :multiple="true"
      @remove="()=>{return false}"
      @preview="handlePreview"
      :show-remove-icon="false"
      :showRemoveIcon="false"
      :fileList="BaseTool.UPLOAD.transImg(imagesList)"
    >
    </a-upload>
    <a-modal :visible="previewVisible" :footer="null" @cancel="()=>{this.previewVisible = false}">
      <img alt="example" style="width: 100%" :src="previewImageSrc" />
    </a-modal>
  </div>
</template>

<script>
export default {
  name: 'UploadImageDetail',
  props: {
    imagesList: {
      type: Array,
      default: () => ([])
    }
  },
  data () {
    return {
      previewVisible: false,
      previewImageSrc: ''
    }
  },
  computed: {
  },
  created () {
  },
  methods: {
    async handlePreview (file) {
      this.previewImageSrc = file.url
      this.previewVisible = true
    }
  },
  updated: function () {

  }
}
</script>

<style scoped>

</style>
