qrCodeDialog.vue
674 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
40
41
<script setup>
const props = defineProps({
showCodeDialog: {
type: Boolean,
default: false,
},
qrCode: {
type: String,
default: "",
},
});
const emit = defineEmits(["closeDialog"]);
const handleCloce = () => {
emit("closeDialog", false);
};
</script>
<template>
<div>
<el-dialog
v-model="props.showCodeDialog"
title="支付"
width="300"
:before-close="handleCloce()"
>
<div>
<img class="qrcode" :src="props.qrCode" />
</div>
</el-dialog>
</div>
</template>
<style scoped lang="scss">
.qrcode {
width: 150px;
height: 150px;
background-color: #8623fc;
margin: 0 auto;
}
</style>