<template>
  <div class="steps-box">
    <el-steps :active="active" align-center>
      <el-step v-for="(item, index) in stepsData" :title="item.formBusinessName" :key="index"></el-step>
    </el-steps>
  </div>
</template>

<script>
module.exports = {
  props: {
    stepsData: {
      type:Array,
      default: () => []
    }
  },
  data() {
    return {
      active: 3
    }
  },
  watch: {
    stepsData: {
      handler() {
        this.active =  this.stepsData.length
      },
      immediate: true,
      deep: true
    }
  }
}
</script>

<style scoped>

</style>
<style>
.steps-box .el-step__title {
  font-size: 14px;
}
.steps-box .el-step__title.is-finish {
  color: #5AC4FC;
}
.steps-box .el-step__head.is-finish {
  color: #fff;
  border-color: #5AC4FC;
}
.steps-box .el-step__icon.is-text {
  background: #5AC4FC;
}
</style>
