<script lang="ts" setup> import { ref } from 'vue' const centerDialogVisible = ref(false) const imgurl = ref('') const title = ref('') const initDialog = (row: any) => { centerDialogVisible.value = true imgurl.value = row.electricityDetail title.value = row.electricityName } defineExpose({ initDialog, }) </script> <template> <el-dialog v-model="centerDialogVisible" :title="title" width="30%" align-center append-to-body > <show-photo :minio-file-name="url" width="100%" height="125px" /> <!-- <template #footer> <span class="dialog-footer"> <el-button @click="centerDialogVisible = false">Cancel</el-button> <el-button type="primary" @click="centerDialogVisible = false"> Confirm </el-button> </span> </template> --> </el-dialog> </template> <style scoped> .dialog-footer button:first-child { margin-right: 10px; } </style>