Stepper.vue
2.12 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
<template>
<div class="StepperBlock">
<div id="StepperBody">
<div id="Step1" class="StepCycle" :class="step === 1 ? '' : 'Step1Finish'">
<v-icon v-if="step !== 1" id="StepperCheck" >check</v-icon>
<div v-if="step === 1">1</div>
<span>设置密码</span>
</div>
<v-divider id="StepDivider" :class="step === 1 ? '' : 'Step1Finish'"></v-divider>
<div id="Step2" class="StepCycle">
<div>2</div>
<span>确认密码</span>
</div>
</div>
</div>
</template>
<script>
export default {
data: () => ({
}),
props: ['step']
}
</script>
<style lang="scss" scoped>
.StepperBlock {
width: 100vw;
#StepperBody {
text-align: center;
position: relative;
margin-top: 3.5rem;
height: 5rem;
#StepDivider {
width: 30%;
height: 2px;
display: inline-block;
position: absolute;
top: 1.2rem;
right: 35%;
transition: all 0.3s ease-in-out;
&.Step1Finish {
background-color: $gold;
}
}
.StepCycle {
display: inline-block;
width: 2.5rem;
height: 2.5rem;
border-radius: 2.5rem;
background-color: #D9D7D7;
position: absolute;
top: 0;
transition: all 0.3s ease-in-out;
#StepperCheck {
display: block;
height: 2.5rem;
width: 2.5rem;
line-height: 2.5rem;
color: #fff;
transition: all 0.3s ease-in-out;
}
&.Step1Finish {
background-image: linear-gradient(-229deg, #DAB269 37%, #E7C78C 87%);
}
&#Step1 {
left: calc(35% - 2.5rem);
}
&#Step2 {
right: calc(35% - 2.5rem);
clear: left;
}
span {
display:block;
width: 5rem;
margin-left: -1.2rem;
margin-top: 0.7rem;
}
div {
width: 2.5rem;
height: 2.5rem;
line-height: 2.5rem;
text-align: center;
font-size: 18px;
color: #000;
font-weight: bold;
}
}
}
}
</style>