<script setup>
import {ref} from 'vue';
import {Message} from "@arco-design/web-vue";

const visible = ref(false);
const {srcList} = defineProps({
    srcList: {
        type: Array,
        default: () => [],
    }
});
</script>

<template>
    <div @click="srcList.length===0?Message.warning('暂无预览'):visible=true">
        <slot></slot>
    </div>

    <a-image-preview-group
        v-bind="$attrs"
        :srcList="srcList"
        v-model:visible="visible">
    </a-image-preview-group>
</template>

<style scoped lang="scss">

</style>
