el-steps的封装与修改样式

在这里插入图片描述

<template>
    <div>
        <el-steps :active="currentStep" simple>
            <el-step
                v-for="(item, index) in stepsArr"
                :key="index"
                :title="item.title"
                :icon="item.icon"
            />
        </el-steps>
    </div>
</template>

<script>
    export default {
        name: 'Step',
        props: {
            currentStep: {
                type: Number,
                default: 0
            },
            stepsArr: {
                type: Array,
                default: () => []
            }
        },
        data() {
            return {

            };
        }
    };
</script>

<style lang="scss" scoped>
/deep/ .el-steps {
  width: 100%;
  padding-top: 30px;
  padding-bottom: 30px;
  margin-bottom: 30px;
  border-bottom: 1px solid #ccc;
}
/deep/ .el-step.is-simple {
    flex-basis: 25% !important;
    width: 20%;
}
/deep/ .el-steps--simple {
  background-color: #fff;
}

/deep/ .el-step__head.is-process,
/deep/ .el-step__head.is-wait,
/deep/ .el-step__head.is-finish {
    margin-right: 10px;
    padding: 5px;
    border-radius: 50%;
}
/deep/ .el-step__head.is-process {
    color: #0b7ef1;
    border: 1px solid #0b7ef1;
}
/deep/ .el-step__head.is-wait {
    color: #C0C4CC;
    border: 1px solid #C0C4CC;
}
/deep/ .el-step__head.is-finish{
    color: #0b7ef1;
    border: 1px solid #0b7ef1;
}
/deep/ .el-step__title.is-process {
  color: #0b7ef1;
}
/deep/ .el-step__title.is-finish {
    color: #0b7ef1;
}

/deep/ .el-step.is-simple .el-step__arrow {
    &::before {
        content: '...';
        display: inline-block;
        height: 0;
        width: 0;
        position: absolute;
        top: -20px;
        color: #ccc;
        background: none;
        font-size: 40px;
        transform: rotate(0deg) translateY(-4px);
    }
    &::after {
        height: 0;
        width: 0;
    }
}
</style>

  • 1
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值