doum
2025-12-11 0e64826473e7074b1cd9920e573c5b0472003fa9
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
<template>
    <view>
        <view class="steps-container">
            <view v-for="(item, index) in steps" :key="index" class="step-item">
                <view class="step-line">
                    <view class="line" :class="index!=0?`line-v ${index<=active?'value-select':''}`:''"></view>
                    <view class="value" :class="index<=active?'value-select':''">{{ index + 1 }}</view>
                    <view class="line" :class="index!=2?`line-v ${index<active?'value-select':''}`:''"></view>
                </view>
                <view class="title" :class="index<=active?'select':''">{{ item.title }}</view>
            </view>
        </view>
    </view>
</template>
 
<script>
    export default {
        props: {
            steps: {
                type: Array,
                default: () => []
            },
            active: 0
        },
        data() {
            return {
                
            };
        }
    }
</script>
 
<style lang="scss" scoped>
.steps-container {
    display: flex;
    background-color: #FFFFFF;
    padding: 66rpx 0 26rpx;
    .step-item {
        width: 33.33%;
        text-align: center;
        .step-line {
            display: flex;
            .line {
                flex: 1;
            }
            .line-v {
                height: 4px;
                background: #D9D9D9;
                margin: auto 0;
            }
            .value {
                width: 48rpx;
                height: 48rpx;
                background: #D9D9D9;
                border-radius: 50%;
                font-weight: 500;
                color: #FFFFFF;
                line-height: 48rpx;
                font-size: 32rpx;
            }
            .value-select {
                background: #D20A0A;
            }
        }
        .title {
            height: 28rpx;
            font-size: 28rpx;
            font-weight: 500;
            color: #CCCCCC;
            line-height: 28rpx;
            margin-top: 16rpx;
        }
        .select {
            color: #D20A0A;
        }
    }
}
</style>