<template>
    <el-dialog v-model="dialogVisible">
        <img w-full :src="dialogImageUrl" alt="Preview Image" />
    </el-dialog>
</template>

<script setup lang='ts'>

interface DialogProps {
    openDialog: (params: string) => void
}
const dialogVisible = ref(false)
const dialogImageUrl = ref('')

const openDialog = (imgUrl: string) => {
    dialogVisible.value = !dialogVisible.value
    dialogImageUrl.value = imgUrl
}
defineExpose({
    openDialog
})
</script>
<style scoped></style>