steps_1.vue
1.14 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
<template>
<view class="steps">
<u-time-line>
<u-time-line-item v-for="(item,i) in options" :key="i">
<template v-slot:node>
<view
:class="['steps-dot',item.type=='0'?'u-type-success-bg':item.type=='1'?'u-type-primary-bg':'u-type-info-bg']">
</view>
</template>
<template v-slot:content>
<view>
<view
:class="['steps-title',item.type=='0'?'u-type-success':item.type=='1'?'u-type-primary':'u-type-info']">
{{item.nodeName}}
</view>
<view class="steps-desc" v-if="item.nodeCode!=='end'">{{item.userName}}</view>
</view>
</template>
</u-time-line-item>
</u-time-line>
</view>
</template>
<script>
export default {
name: 'Steps',
props: {
options: {
type: Array,
default () {
return []
}
}
},
data() {
return {}
}
}
</script>
<style lang="scss" scoped>
.steps {
.steps-dot {
height: 8px;
width: 8px;
border-radius: 50px;
}
.steps-title {
font-size: 30rpx;
line-height: 36rpx;
}
.steps-desc {
margin-top: 10rpx;
font-size: 26rpx;
line-height: 36rpx;
color: #909399;
margin-bottom: 10rpx;
}
}
</style>