<script setup>
/*
* 此组件的目的是使用该图片组件自带预览大图
* */
import { showImagePreview } from 'vant';
const props = defineProps({
  src: {
    type: String,
    default: ''
  },
  preview: {
    type: Boolean,
    default: true
  }
})
const showImage = () => {
  if (props.preview) {
    showImagePreview([props.src]);
  }
}
</script>
<template>
  <img
      v-bind="{ ...props, ...$attrs }"
      @click="showImage"
  >
</template>
