dialog-confirm-info.vue
2.37 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
<template>
<div class="confirm-info-wrapper">
<div class="confrim-info" v-if="confirmDescList.length > 0">
<span v-for="(info, i) in confirmDescList" :key="i">{{ info }}</span>
</div>
<div v-if="info.showPrice" class="price-info">
<p class="price-item">
<span>{{ info.orderPriceDesc }}</span>
<span>{{ info.orderPrice }}</span>
</p>
<p class="price-item">
<span>{{ info.penaltyDesc }} ({{ info.penaltyRate }})</span>
<span class="penalty">{{ info.penaltyAmount }}</span>
</p>
<p class="price-item">
<span>{{ info.refundDesc }}</span>
<span>{{ info.refundAmount }}</span>
</p>
</div>
<div v-if="isPlatformFee" class="price-info">
<p class="price-item">
<span>{{ info.orderPriceDesc }}</span>
<span>{{ info.orderPrice }}</span>
</p>
<p class="price-item">
<span>{{ info.penaltyDesc }} ({{ info.penaltyRate }})</span>
<span>{{ info.penaltyAmount }}</span>
</p>
<p class="price-item">
<span>{{ info.refundDesc }}</span>
<span>{{ info.refundAmount }}</span>
</p>
</div>
</div>
</template>
<script>
export default {
props: {
info: {
type: Object,
default: function() {
return {};
}
},
isPlatformFee: {
type: Boolean,
default: false
},
platformFeeInfo: {
type: Object,
default: function() {
return {};
}
}
},
computed: {
confirmDescList() {
const { confirmDesc = "" } = this.info;
if (confirmDesc.includes("#*")) {
const regexp = /#\*(.*?)\*#/;
return confirmDesc.split(regexp);
} else {
return confirmDesc ? [confirmDesc] : [];
}
}
}
};
</script>
<style lang="scss" scoped>
.confirm-info-wrapper {
display: flex;
padding: 0 40px;
color: #000;
.confrim-info {
font-size: 28px;
text-align: center;
flex: 1;
span {
color: #d0021b;
}
& > :first-child,
& > :last-child {
color: #000;
padding-left: 10px;
}
// p {
// display: inline-block;
// text-align: left;
// max-width: 100%;
// }
}
.price-info {
flex: 1;
.price-item {
display: flex;
justify-content: space-between;
.penalty {
color: #d0021b;
}
}
}
}
</style>