element组件的使用之步骤条

1.实现效果:

2.template代码

遍历数组

  • active:指定哪一个状态是完成状态

  • finish-status:完成状态wait / process / finish / error / success

  • description:文字描述信息

  • slot="icon":自定义插槽图标(为空则不显示图标)

<el-steps direction="vertical"

:active="active"

finish-status="success">

<el-step v-for="(item,index) in form.list"

:key="index"

:description="`${item.time} ${item.desc}`">

<i slot="icon"></i>

</el-step>

</el-steps>

3.css样式

  • 设置头部

::v-deep .el-step__head {

margin-top: -1.5px;

}

  • 设置内容

::v-deep .el-step__main {

padding: 15px;

margin-left: -18px;

}

::v-deep .el-step__title {

display: none;

}

::v-deep .el-step__description {

letter-spacing: 2px;

margin-top: -12px;

color: #252d57;

}

  • 设置步骤线

::v-deep .el-step.is-vertical .el-step__line {

width: 1px;

top: 19px;

bottom: -8px;

margin-left: -7px;

}

  • 设置当前步骤的样式

::v-deep .el-step__head.is-process {

.el-step__icon {

background: transparent;

border-color: #377bff;

}

}

  • 设置其他步骤的样式

::v-deep .el-step__icon {

width: 10px;

height: 10px;

border-width: 2.5px;

background: #909399;

border-color: #909399;

}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值