imgOtherDialog.vue
790 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<template>
<a-modal
title="body1"
v-if='isVisible'
v-model:visible="isVisible"
width="1200px"
height='90%'
class="detail-modal"
>
<div style="width: 100%;text-align: center;">
<el-image :src="imgUrl" :fit="'contain'" class="single-image"> </el-image>
</div>
<template #footer>
<a-button @click="isVisible=false">返回</a-button>
</template>
</a-modal>
</template>
<script>
import { reactive, ref } from "vue";
export default {
setup() {
const isVisible = ref(false);
const imgUrl = ref()
const initDialog = (url) => {
imgUrl.value = url
isVisible.value = true;
};
return {
isVisible,
initDialog,
imgUrl,
};
},
};
</script>
<style lang="less" scoped>
</style>