<template>
  <view class="img-box">
    <view class="img-item" v-for="(fileItem,fileIndex) in fileList">
      <image @click="previewImage(fileIndex)" :src="fileItem"  mode="aspectFill"></image>
    </view>
  </view>
</template>

<script>
export default {
  name: "img-two",
  components: {},
  props: {
    fileList:{
      default:[]
    }
  },
  data() {
    return {}
  },
  watch: {},
  mounted() {

  },
  methods: {
    previewImage(index){
      return;
      uni.previewImage({
        urls: this.fileList,
        current:index
      });
    }
  }
}
</script>

<style scoped lang="scss">
.img-box{
  height: auto;
  display: flex;
  flex-wrap: wrap;
  .img-item{
    display: inline-block;
    margin-right:12rpx;
    image{
      width: calc((100vw - 200rpx)/2);
      height: calc((100vw - 200rpx)/2);
      border-radius: 16rpx;
    }
  }
  .img-item:nth-of-type(even){
    margin-right:0;
  }
  .img-item:nth-of-type(n+3){
    margin-top:10rpx;
  }

}
</style>
