steps步骤条+上一步+下一步

步骤条在第一步提现申请的时候,只显示下一步。在第二步提现确认的时候,显示上一步和下一步。第三步完成提现的时候显示确认按钮。
在这里插入图片描述

  <span :class="{active:prevStep===0}" >
        <a-button type="" @click="prev" >上一步</a-button>
        </span>
        <a-button v-if="stepIndex === 0" type="primary" @click="next" >下一步</a-button>
        <a-button v-else-if="stepIndex === 1" type="primary" :loading="nextLoading" @click=" prev() {
      this.stepIndex--
      if (this.stepIndex < 0) {
        this.stepIndex = 0
      }
      if (this.stepIndex === 0) {
        this.prevStep = 0;
        this.getWithdrawableAmount()
      }
    },
    next() {
      if (!this.queryParams.fDeAmount) {
        this.$message.warning('请填写提现金额')
        return
      }
      this.stepIndex++
      if (this.stepIndex > 2) {
        this.stepIndex = 2
      }
      if(this.stepIndex=1){
        this.prevStep=1;
      }
    },">确认</a-button>

active类名,控制样式隐藏
在这里插入图片描述
data中定义 prevStep:0,

 prev() {
      this.stepIndex--
      if (this.stepIndex < 0) {
        this.stepIndex = 0
      }
      if (this.stepIndex === 0) {
        this.prevStep = 0;
        this.getAmount()//调用方法
      }
    },
    next() {
      if (!this.queryParams.fDeAmount) {
        this.$message.warning('请填写提现金额')
        return
      }
      this.stepIndex++
      if (this.stepIndex > 2) {
        this.stepIndex = 2
      }
      if(this.stepIndex=1){
        this.prevStep=1;
      }
    },
  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值