time-line.vue
1.36 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
<template>
<ul class="time-line-wrapper">
<li
class="time-line-item"
v-for="(deliveryDetail, i) in deliveryList"
:key="i"
>
<i
:class="
i === 0
? 'time-line-label iconfont iconxuanzhongduigou active'
: 'time-line-label'
"
></i>
<div>
<p class="content">{{ deliveryDetail.acceptRemark }}</p>
<p class="time">{{ deliveryDetail.createTimeStr }}</p>
</div>
</li>
</ul>
</template>
<script>
export default {
props: {
deliveryList: {
type: Array,
default: []
}
}
};
</script>
<style lang="scss" scoped>
.time-line-wrapper {
padding: 40px 0 80px 20px;
.time-line-item {
position: relative;
padding: 0 40px 40px 40px;
border-left: 1px solid #eee;
font-size: 28px;
color: #999;
display: flex;
align-items: flex-start;
&:last-child {
border-left: none;
}
.content {
margin-top: -8px;
}
.time-line-label {
width: 20px;
height: 20px;
background: #eee;
border-radius: 50%;
display: block;
position: absolute;
left: -10px;
&.active {
width: 40px;
height: 40px;
font-size: 40px;
line-height: 1;
left: -21px;
background: #fff;
top: -10px;
color: #000;
}
}
}
}
</style>