ShipmentPickReviewModal.vue
1.41 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<template>
<div v-if="visible" class="modal-overlay">
<div class="modal-content">
<h3>审核确认</h3>
<p>请确认是否通过审核:</p>
<div class="button-group">
<a-button type="primary" @click="approve">审核通过</a-button>
<a-button type="danger" @click="reject">审核不通过</a-button>
</div>
<a-button class="close-btn" @click="close">关闭</a-button>
</div>
</div>
</template>
<script>
export default {
props: {
visible: {
type: Boolean,
default: false,
},
},
watch: {
visible(val) {
console.log('Modal visibility changed:', val);
},
},
methods: {
approve() {
console.log('审核通过按钮被点击');
this.$emit('approve');
this.close();
},
reject() {
console.log('审核不通过按钮被点击');
this.$emit('reject');
this.close();
},
close() {
console.log('关闭按钮被点击');
this.$emit('close');
},
},
};
</script>
<style scoped>
.modal-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5);
display: flex;
justify-content: center;
align-items: center;
}
.modal-content {
background: white;
padding: 20px;
border-radius: 5px;
text-align: center;
}
.button-group {
margin: 20px 0;
}
a-button {
margin: 0 10px;
}
.close-btn {
margin-top: 20px;
}
</style>