<template>
  <a-modal
    :visible="visible"
    @cancel="handleCancel"
    :footer="null">
    <a-carousel arrows>
      <div
        slot="prevArrow"
        slot-scope="props"
        class="custom-slick-arrow"
        style="left: 10px;zIndex: 1"
      >
        <a-icon type="left-circle" />
      </div>
      <div slot="nextArrow" slot-scope="props" class="custom-slick-arrow" style="right: 10px">
        <a-icon type="right-circle" />
      </div>
      <div v-for="(fileDetail,index) in idcard" :key="index">
        <img alt="picture" style="width: 100%;" :src="fileDetail" />
      </div>
    </a-carousel>
  </a-modal>
</template>

<script>

  export default {
    name: "HlwPictureModal",
    components: {
    },
    data () {
      return {
        form: this.$form.createForm(this),
        title:"操作",
        width:800,
        disableSubmit:false,
        bodyStyle: {
          'overflow-y': 'auto'
        },
        visible: false,
        model: {},
        selectedRole:[],
        roleList:[],
        labelCol: {
          xs: { span: 24 },
          sm: { span: 5 },
        },
        wrapperCol: {
          xs: { span: 24 },
          sm: { span: 16 },
        },
        headers:{},
        picUrl:'',
        uploadLoading:false,
        confirmLoading: false,
        previewImage:'',
        idcard:[],
      }
    },
    created () {

    },
    methods: {
      add () {
        this.picUrl = '';
        this.edit({});
      },
      edit (record) {
        this.idcard = record;
        this.visible = true;
      },
      close () {
        this.$emit('close');
        this.visible = false;
      },
      handleCancel () {
        this.close()
      },
    }
  }
</script>
<style scoped>
  /* For demo */
  .ant-carousel >>> .slick-slide {
    text-align: center;
    /*height: 460px;*/
    /*line-height: 460px;*/
    /*background: #364d79;*/
    overflow: hidden;
  }

  .ant-carousel >>> .custom-slick-arrow {
    width: 25px;
    height: 25px;
    font-size: 25px;
    color: #fff;
    background-color: rgba(31, 45, 61, 0.11);
    opacity: 0.3;
  }
  .ant-carousel >>> .custom-slick-arrow:before {
    display: none;
  }
  .ant-carousel >>> .custom-slick-arrow:hover {
    opacity: 0.5;
  }

  .ant-carousel >>> .slick-slide h3 {
    color: #fff;
  }
</style>