progress.vue
2.83 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
<template>
<div class="progress_container">
<main class="progress_content">
<section class="progress_own">
<h3 class="section_title">{{progressTitle}}</h3>
<van-steps direction="vertical" :active="1">
<van-step v-for="stepItem in stepsInfo" :key="stepItem.id">
<div slot="active-icon" class="circle_outer">
<div class="circle_inner"></div>
</div>
<div class="step_content">
<span class="step_left">
<h3 class="step_title">{{stepItem.title}}</h3>
<a href="" class="step_link" v-if="stepItem.link">{{stepItem.link}}</a>
<div class="step_action" v-if="stepItem.expand"></div>
</span>
<span class="step_right">{{stepItem.time}}</span>
</div>
</van-step>
</van-steps>
</section>
<section class="progress_expand">
<h3 class="section_title">
<slot name="title">
</slot>
</h3>
<main>
<slot name="content">
</slot>
</main>
</section>
</main>
</div>
</template>
<script>
export default {
name: "ProgressComponent",
props: {
stepsInfo: {
type: Object|Object,
default: ()=> {
return {}
}
},
progressTitle: {
type: String,
default: ()=> {
return ''
}
}
},
data() {
return {
}
},
}
</script>
<style lang="less" scoped>
.progress_container {
padding: 15px;
.section_title {
font-size: 16px;
line-height: 16px;
padding-left: 6px;
color: #222222;
font-family: PingFangSC-Semibold;
border-left: 2.5px solid #135faa;
}
}
::v-deep .van-step--vertical {
opacity: 0.3;
.van-step__circle {
width: 6px;
height: 6px;
background-color: #106abc;
}
.van-step__line {
opacity: 0.3;
}
}
::v-deep .van-step--finish,
::v-deep .van-step--process {
opacity: 1;
}
::v-deep .van-step--finish {
.van-step__line {
opacity: 1;
}
}
::v-deep .van-step__line {
background: linear-gradient(
to bottom,
#106abc,
#106abc 2px,
transparent 2px,
transparent
);
background-size: 100% 4px;
margin-left: -1px;
}
::v-deep .van-hairline::after {
border: none;
}
.step_content {
display: flex;
justify-content: space-between;
.step_left {
.step_title {
font-size: 15px;
color: #333333;
line-height: 21px;
}
.step_link {
font-size: 12px;
line-height: 17px;
color: #388de2;
text-decoration: underline;
}
}
.step_right {
font-size: 12px;
color: #666666;
line-height: 17px;
}
}
.circle_outer {
padding: 3px;
border-radius: 50%;
background-color: #cbe3f9;
.circle_inner {
width: 6px;
height: 6px;
border-radius: 50%;
background-color: #106abc;
}
}
</style>