forked from gzzfw/frontEnd/gzDyh

liuwh
2024-08-22 e7e6c4618860aa0899ffb00c5eb892df1ac895eb
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
<!--步骤条-->
<view class="steps">
    <block wx:if="{{ stepsType === 'number' }}">
        <view class="steps-item {{ index <= stepsActive && 'steps-item-active' }}" wx:for="{{ stepsData }}" wx:key="index">
            <view class="steps-item-round" wx:if="{{ index > stepsActive }}">{{ index + 1 }}</view>
            <view class="steps-item-round" wx:else>
                <van-icon name="success" />
            </view>
            <view class="steps-item-text">{{ item }}</view>
            <view class="steps-item-icon" wx:if="{{ index < stepsData.length - 1 }}">
                <block wx:if="{{ index > stepsActive }}">
                    <van-icon name="{{ imgUrl }}steps-arrow.png" size="14" />
                </block>
                <block wx:else>
                    <van-icon name="{{ imgUrl }}steps-arrow-active.png" size="14" />
                </block>
            </view>
        </view>
    </block>
    <block wx:else>
        <view class="steps-item {{ index <= stepsActive && 'steps-item-active' }}" wx:for="{{ stepsData }}" wx:key="index">
            <view class="steps-item-round" wx:if="{{ index > stepsActive }}">
                <van-icon name="{{ imgUrl }}{{ item.icon }}" />
            </view>
            <view class="steps-item-round" wx:else>
                <van-icon name="{{ imgUrl }}{{ item.activeIcon }}" />
            </view>
            <view class="steps-item-text">{{ item.title }}</view>
            <view class="steps-item-icon" wx:if="{{ index < stepsData.length - 1 }}">
                <block wx:if="{{ index > stepsActive }}">
                    <van-icon name="{{ imgUrl }}steps-arrow.png" size="14" />
                </block>
                <block wx:else>
                    <van-icon name="{{ imgUrl }}steps-arrow-active.png" size="14" />
                </block>
            </view>
        </view>
    </block>
</view>