<template>
  <div>
    <!-- 需要绑定放图片的数组，接收固定参数 -->
    <viewer class="container" :images="images">
      <div class="imgWrapper" v-if="images.length > 0">
        <div class="img" v-for="(item, index) of images" :key="index">
          <img :key="item" :src="item" alt="" />
        </div>
      </div>
    </viewer>
  </div>
</template>

<script>
export default {
  name: 'imageView',
  props: {
    imageArray: {
      type: Array,
      default () {
        return []
      }
    },
  },
  data() {
    return {
      images: [],
      isUrl: false,
    }
  },
  created() {
    this.images = imageArray
  }
}
</script>

<style lang="less" scoped>
.viewer-toolbar {
  .viewer-flip-horizontal {
    display: none;
  }
  .viewer-flip-vertical {
    display: none;
  }
}
</style>