自定义步骤条

 <!-- 自定义步骤条 -->

      <view class="step-container">

        <view class="step-box">

          <view class="step-one">

            <text class="lg text-green cuIcon-radiobox step-one-icon"></text>

            <view

              class="step-one-back"

              :class="stepChange >= 1 ? 'bg-green' : 'bg-gray'"

            ></view>

          </view>

          <view class="step-one">

            <text

              class="lg cuIcon-radiobox step-one-icon"

              :class="stepChange >= 1 ? 'text-green' : 'text-gray'"

            ></text>

            <view

              class="step-one-back"

              :class="stepChange >= 2 ? 'bg-green' : 'bg-gray'"

            ></view>

          </view>

          <view class="step-one">

            <text

              class="lg cuIcon-radiobox step-one-icon"

              :class="stepChange >= 2 ? 'text-green' : 'text-gray'"

            ></text>

            <view

              class="step-one-back"

              :class="stepChange >= 3 ? 'bg-green' : 'bg-gray'"

            ></view>

          </view>

          <view class="step-one">

            <text

              class="lg cuIcon-radiobox step-one-icon"

              :class="stepChange >= 3 ? 'text-green' : 'text-gray'"

            ></text>

          </view>

        </view>

        <view class="step-textBox">

          <view class="text-green">1.基础资料</view>

          <view class="margin-left" :class="stepChange >= 1 ? 'text-green' : ''"

            >2.相关资料</view

          >

          <view class="margin-left" :class="stepChange >= 2 ? 'text-green' : ''"

            >3.户籍资料</view

          >

          <view class="margin-left" :class="stepChange >= 3 ? 'text-green' : ''"

            >4.其他资料</view

          >

        </view>

      </view>

      <button @click="numberChange(stepChange)">按钮</button>

ts

stepChange = 0;

 numberChange(res: any) {

    this.stepChange = res + 1;

  }

less

.step-container {

  .step-box {

    margin-left: 30rpx;

    display: flex;

    flex-direction: row;

    .step-one {

      margin-left: -2rpx;

      .step-one-icon {

        border-radius: 50%;

        width: 38rpx;

        height: 38rpx;

        background-color: rgb(239, 239, 237);

        font-size: 70rpx;

        transition-duration: 1s;

      }

      .step-one-back {

        margin-top: -48rpx;

        margin-left: 56rpx;

        width: 132rpx;

        height: 24rpx;

        transition-duration: 1s;

      }

    }

  }

  .step-textBox {

    margin-left: 20rpx;

    display: flex;

    flex-direction: row;

  }

}

.container {

  .successBox {

    margin-top: 64rpx;

    margin-left: -28rpx;

    align-items: center;

    .iconYes {

      font-size: 40rpx;

      color: #06cb7c;

    }

    .success {

      padding-left: 14rpx;

      font-size: 56rpx;

    }

    .examine {

      padding-left: 16rpx;

      font-size: 28rpx;

      color: #101010;

    }

  }

}

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值