steps.vue
1.72 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
<template>
<view>
<uni-section title="基本用法" type="line" padding>
<uni-steps :options="list1" :active="active" />
</uni-section>
<uni-section title="自定义图标" type="line" padding>
<uni-steps :options="list1" active-icon="checkbox" :active="active" />
</uni-section>
<uni-section title="自定义图标" type="line" padding>
<uni-steps :options="list1" active-icon="medal" :active="active" />
</uni-section>
<uni-section title="纵向排列" type="line" padding>
<uni-steps :options="list2" active-color="#007AFF" :active="active" direction="column" />
</uni-section>
<button type="primary" size="mini" style="margin: 30px 10px; width: 100px;" @click="change">改变状态</button>
</view>
</template>
<script>
export default {
components: {},
data() {
return {
active: 1,
list1: [{
title: '事件一'
}, {
title: '事件二'
}, {
title: '事件三'
}, {
title: '事件四'
}],
list2: [{
title: '买家下单',
desc: '2018-11-11'
}, {
title: '卖家发货',
desc: '2018-11-12'
}, {
title: '买家签收',
desc: '2018-11-13'
}, {
title: '交易完成',
desc: '2018-11-14'
}]
}
},
methods: {
change() {
if (this.active < this.list1.length - 1) {
this.active += 1
} else {
this.active = 0
}
}
}
}
</script>
<style lang="scss">
.status-btn {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
align-items: center;
justify-content: center;
height: 92rpx;
margin: 30rpx;
background-color: #007AFF;
}
.example-body {
/* #ifndef APP-NVUE */
display: block;
/* #endif */
padding: 15px;
flex-direction: row;
}
</style>