progressBox.vue
3.96 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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
<template>
<view class="progressBox">
<view class="titleBox">
<view v-if="stepActive == 'ONE'" class="conductDot">
<view class="conductDot-line"></view>
</view>
<view v-if="stepActive == 'TWO' || stepActive == 'THREE'" class="successDot">
<uni-icons type="checkbox-filled" size="20" color="#347BFF"
style="float: left; margin: 3px;"></uni-icons>
</view>
<view class="title color-292d33" :class="{ 'm-t-8': stepActive == 'TWO' || stepActive == 'THREE' }">经营信息
</view>
</view>
<view class="lineBox">
<view :class="stepActive == 'TWO' || stepActive == 'THREE' ? 'line2' : 'line1'"></view>
</view>
<view class="titleBox">
<view v-if="stepActive == 'ONE'" class="defaultDot">2</view>
<view v-if="stepActive == 'TWO'" class="conductDot">
<view class="conductDot-line"></view>
</view>
<view v-if="stepActive == 'THREE'" class="successDot">
<uni-icons type="checkbox-filled" size="20" color="#347BFF"
style="float: left; margin: 3px;"></uni-icons>
</view>
<view class="title"
:class="{ 'm-t-8': stepActive == 'THREE', 'color-292d33': stepActive == 'TWO' || stepActive == 'THREE', 'color-999ea8': stepActive == 'ONE' }">
收车偏好
</view>
</view>
<view class="lineBox">
<view :class="stepActive == 'THREE' ? 'line2' : 'line1'"></view>
</view>
<view class="titleBox">
<view v-if="stepActive == 'ONE' || stepActive == 'TWO'" class="defaultDot">3</view>
<view v-if="stepActive == 'THREE'" class="conductDot">
<view class="conductDot-line"></view>
</view>
<view class="title" :class="stepActive == 'THREE' ? 'color-292d33' : 'color-999ea8'">品牌偏好</view>
</view>
</view>
</template>
<script lang="ts">
import { Vue, Component } from 'vue-facing-decorator';
@Component({})
export default class progressBox extends Vue {
stepActive = 'ONE';//ONE,TWO,THREE
initData(data: any) {
this.stepActive = data.stepActive || 'ONE';
}
}
</script>
<style scoped lang="scss">
.progressBox {
background: #f7f9fc;
display: table;
margin: 0 auto;
}
.titleBox {
width: 48px;
margin-top: 8px;
float: left;
}
.defaultDot {
width: 20px;
height: 20px;
float: left;
margin: 0 14px;
line-height: 20px;
border-radius: 10px;
background: #dee0e3;
color: #ffffff;
font-size: 12px;
font-weight: 中黑体;
font-family: "苹方-简";
text-align: center;
}
.conductDot {
width: 20px;
height: 20px;
float: left;
background: rgba(52, 123, 255, 0.1);
border-radius: 20px;
margin: 0 14px;
}
.conductDot-line {
width: 8px;
height: 8px;
border-radius: 10px;
border: 3px solid #347bff;
background: #ffffff;
float: left;
margin: 3px;
}
.successDot {
width: 26px;
height: 26px;
float: left;
border-radius: 20px;
background: rgba(52, 123, 255, 0.1);
margin: 0 8px;
margin-top: -1px;
}
.title {
width: 48px;
height: 18px;
float: left;
line-height: 18px;
font-size: 12px;
font-weight: 中黑体;
font-family: "苹方-简";
text-align: center;
margin-top: 12px;
}
.lineBox {
width: 90px;
height: 57px;
float: left;
}
.line1 {
width: 80px;
height: 3px;
float: left;
border-radius: 2px;
background: #dee0e3;
margin-left: 5px;
margin-right: 5px;
margin-top: 17px;
}
.line2 {
width: 80px;
height: 3px;
float: left;
border-radius: 2px;
background: #dde9fb;
margin-left: 5px;
margin-right: 5px;
margin-top: 17px;
}
.color-292d33 {
color: #292d33;
}
.color-999ea8 {
color: #999ea8;
}
.m-t-8 {
margin-top: 8px;
}
</style>