流程图步骤条

1.结构

<ul class="stepUl">

              <li class="stepLi" v-for="(item, index) in stepList" :key="index">

                <div class="top">

                  <p :class="{active: currentState >= item.key}">{{ item.value }}</p>

                  <img

                    v-if="currentState >= item.key"

                    :src="require(`./../../static/img/icons/iconed${index}.png`)"

                  />

                  <img v-else :src="require(`./../../static/img/icons/icon${index}.png`)" />

                </div>

                <div v-if="item.value != '工单闭环'">

                  <img

                    v-if="currentState >= item.key"

                    class="arrow"

                    src="./../../static/img/icons/arrowed.png"

                  />

                  <img

                    v-else

                    class="arrow"

                    src="./../../static/img/icons/arrow.png"

                  />

                </div>

              </li>

            </ul>

2.数据

stepList:[
    {
        "key": "-1",
        "value": "撤单"
    },
    {
        "key": "1",
        "value": "创建工单"
    },
    {
        "key": "20",
        "value": "科室接单"
    },
    {
        "key": "30",
        "value": "科员处理"
    },
    {
        "key": "40",
        "value": "科室确认"
    },
    {
        "key": "50",
        "value": "工单闭环"
    }
]

3.样式

.stepUl {

  display: grid;

  grid-template-columns: repeat(6, 1fr);

  text-align: left;

  .stepLi {

    display: flex;

    justify-content: center;

    align-items: center;

    .top {

      p {

        width: 72px;

        color: #ccc;

        margin-bottom: 5px;

        margin-left: -5px;

        text-align: center;

        &.active {

          color: #000;

        }

      }

      img {

        width: 57px;

      }

    }

    .arrow {

      margin-top: 20px;

    }

  }

}

  • 19
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值