Houjie
2025-04-11 1bf977929dd324f3ac64b70debd8a79443c54392
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
109
110
111
112
113
114
<template>
    <view>
        <cu-custom bgColor="bg-gradual-pink" :isBack="true"><block slot="backText">返回</block><block slot="content">步骤条</block></cu-custom>
        <view class="cu-bar bg-white solid-bottom">
            <view class="action">
                <text class="cuIcon-title text-orange"></text> 基本用法
            </view>
            <view class="action">
                <button class="cu-btn bg-green shadow" @tap="BasicsSteps">下一步</button>
            </view>
        </view>
        <view class="bg-white padding">
            <view class="cu-steps">
                <view class="cu-item" :class="index>basics?'':'text-red'" v-for="(item,index) in basicsList" :key="index">
                    <text :class="'cuIcon-' + item.cuIcon"></text> {{item.name}}
                </view>
            </view>
        </view>
 
        <view class="bg-white padding margin-top-xs">
            <view class="cu-steps">
                <view class="cu-item" :class="index>basics?'':'text-orange'" v-for="(item,index) in basicsList" :key="index">
                    <text :class="index>basics?'cuIcon-title':'cuIcon-' + item.cuIcon"></text> {{item.name}}
                </view>
            </view>
        </view>
 
        <view class="bg-white padding  margin-top-xs">
            <view class="cu-steps steps-arrow">
                <view class="cu-item" :class="index>basics?'':'text-blue'" v-for="(item,index) in basicsList" :key="index">
                    <text :class="'cuIcon-' + item.cuIcon"></text> {{item.name}}
                </view>
            </view>
        </view>
        <view class="cu-bar bg-white solid-bottom margin-top">
            <view class="action">
                <text class="cuIcon-title text-orange"></text> 数字完成
            </view>
            <view class="action">
                <button class="cu-btn bg-green shadow" @tap="NumSteps">下一步</button>
            </view>
        </view>
        <view class="bg-white padding">
            <view class="cu-steps">
                <view class="cu-item" :class="index>num?'':'text-blue'" v-for="(item,index) in numList" :key="index">
                    <text class="num" :class="index==2?'err':''" :data-index="index + 1"></text> {{item.name}}
                </view>
            </view>
        </view>
        <view class="cu-bar bg-white solid-bottom margin-top">
            <view class="action">
                <text class="cuIcon-title text-orange"></text> 多级显示
            </view>
            <view class="action">
                <button class="cu-btn bg-green shadow" @tap="ScrollSteps">下一步</button>
            </view>
        </view>
        <scroll-view scroll-x class="bg-white padding response cu-steps steps-bottom" :scroll-into-view="'scroll-' + scroll"
         scroll-with-animation>
            <view class="cu-item padding-lr-xl" :class="index>scroll?'':'text-blue'" v-for="(item,index) in 10" :key="index" :id="'scroll-' + index">
                Level {{index + 1}} <text class="num" :data-index="index + 1"></text>
            </view>
        </scroll-view>
    </view>
</template>
 
<script>
    export default {
        data() {
            return {
                basicsList: [{
                    cuIcon: 'usefullfill',
                    name: '开始'
                }, {
                    cuIcon: 'radioboxfill',
                    name: '等待'
                }, {
                    cuIcon: 'roundclosefill',
                    name: '错误'
                }, {
                    cuIcon: 'roundcheckfill',
                    name: '完成'
                }, ],
                basics: 0,
                numList: [{
                    name: '开始'
                }, {
                    name: '等待'
                }, {
                    name: '错误'
                }, {
                    name: '完成'
                }, ],
                num: 0,
                scroll: 0
            };
        },
        methods: {
            BasicsSteps() {
                this.basics= this.basics == this.basicsList.length - 1 ? 0 : this.basics + 1                
            },
            NumSteps() {
                this.num= this.num == this.numList.length - 1 ? 0 : this.num + 1                
            },
            ScrollSteps() {
                this.scroll= this.scroll == 9 ? 0 : this.scroll + 1                
            }
        }
    }
</script>
 
<style>
 
</style>