宜呗小程序--微信小程序
Lzk
2025-08-05 b7bcaf556aa2424e808b6e6426ab22df9cfe11c1
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
<script>
export default {
  props: {
    active: {
      type: Number,
      default: 0
    }
  },
  name: "index"
}
</script>
 
<template>
  <view class="steps">
    <view class="num" :class="active >= 0 ? 'active' : ''">
      <view  class="future"></view>
      <view class="str">第一步</view>
    </view>
    <view class="num "  :class="active >= 1 ? 'active' : ''">
      <view class="future" style="margin: auto"></view>
      <view class="str" style="text-align: center">第二步</view>
    </view>
    <view class="num "  style="position: relative" :class="active >= 2 ? 'active' : ''">
      <view style="display: flex;justify-content: end;flex-direction: row"> <view class="future" ></view></view>
      <view class="str" style="text-align: right">第三步</view>
    </view>
  </view>
 
</template>
 
<style scoped lang="scss">
.steps {
  background: white;
  border-radius: 16rpx 16rpx 16rpx 16rpx;
  display: flex;
  flex-direction: row;
  padding: 40rpx ;
  position: relative;
  &:after{
    content: '';
    position: absolute;
    width: calc( 100% - 144rpx );
    height: 4rpx;
    background: #E7E9ED;
    top: calc( 50% - 22rpx);
    left: calc(  94rpx);
    z-index: 2;
  }
  .num{
    flex: 1;
    display: flex;
    justify-content: center;
    text-align: center;
  }
  .future{
    width: 55rpx;
    height: 55rpx;
    display: inline-block;
    background: white;
    border-radius: 50%;
    z-index: 40;
    position: relative;
    &::after{
      position: absolute;
      content: '';
      width: 20rpx;
      height: 20rpx;
      z-index: 9;
      background: #AAAAAA;
      border-radius: 50%;
      top: calc( 50% - 10rpx);
      left:  calc( 50% - 10rpx);
    }
  }
  .str{
 
    color: #AAAAAA;
    font-size: 24rpx;
    font-weight: 700;
    margin-top: 14rpx;
  }
 
 
  .active{
    .future{
      width: 55rpx;
      height: 55rpx;
      background: #2865F2;
      position: relative;
      z-index: 52;
      &::after{
        position: absolute;
        content: '';
        width: 20rpx;
        height: 20rpx;
        background: white;
        border-radius: 50%;
        top: calc( 50% - 10rpx);
        left:  calc( 50% - 10rpx);
      }
    }
    .str{
      color: #2865F2;
    }
  }
}
 
</style>