VipDialog.vue
2.3 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
114
115
116
117
118
119
120
121
<template>
<van-action-sheet
v-model="showBox"
:actions="data"
cancel-text="取消"
close-on-click-action
@cancel="onCancel"
@click-overlay="onCancel"
>
<div class="box">
<div class="title flex">
会员套餐名称
<div class="subtitle">内含xxx项权益项目</div>
</div>
<div class="items">
<template v-for="(i,index) in 10">
<div
:key="index"
class="item"
>
<div class="name flex">
{{index + 1}}、精洗轿车-五座轿车
<div class="num">数量:x3</div>
</div>
<div class="decoration flex">
有效期:365天
<span>有效期内可用1次</span>
</div>
</div>
</template>
</div>
<div class="tips">
附:购买套餐后到店赠送餐具一套
</div>
</div>
</van-action-sheet>
</template>
<script type='text/ecmascript-6'>
export default {
name: 'VipDialog',
props: {
value: Boolean,
data: {
type: Array,
default: () => {
return []
}
},
},
watch: {
value (n) {
this.showBox = n
}
},
data () {
return {
showBox: true
}
},
mounted () {
},
methods: {
onCancel () {
this.$emit('cancel', false)
}
}
}
</script>
<style scoped lang='scss'>
.box {
padding: 0 16px;
.title {
height: 56px;
color: #333333;
font-size: 16px;
position: sticky;
top: 0;
background-color: #fff;
z-index: 2;
.subtitle {
font-size: 12px;
color: #3a3a3a;
margin-left: auto;
}
}
.tips {
color: #656566;
font-size: 11px;
padding: 9px 0 22px;
}
.items {
padding-left: 23px;
.item {
height: 61px;
border-bottom: 1px solid #f8f8f8;
position: relative;
font-size: 14px;
color: #333333;
padding: 12px 0;
box-sizing: border-box;
.name {
width: calc(100% + 23px);
margin-left: -23px;
font-weight: 500;
.num {
margin-left: auto;
color: #282829;
font-size: 12px;
}
}
.decoration {
justify-content: space-between;
font-size: 12px;
color: #cfcfd1;
}
}
}
}
</style>