<template>
  <div class="stepBox">
          <div class="stepItem" v-for="step in stepList" :key="step.id">
            <div
              class="circle"
              :class="{
                finfish: step.finish,
                todo: step.todo,
                unFinish: step.unFinish
              }"
            >
              <el-icon v-if="step.finish"><Check /></el-icon>
              <span v-else>{{ step.id }}</span>
            </div>
            <div class="stepTitle">{{ step.title }}</div>
          </div>
        </div>
</template>
<script setup>
const props = defineProps({
  stepList: {
    type: Array,
    default: () => []
  }
})
</script>
<style lang="scss" scoped>
.stepBox {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  .stepItem {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 100px;
    box-sizing: border-box;
    .circle {
      width: 35px;
      height: 35px;
      box-sizing: border-box;
      border-radius: 50%;
      display: flex;
      justify-content: center;
      align-items: center;
      .el-icon {
        font-size: 16px;
        font-weight: 600;
      }
    }
    .finfish {
      background-color: #e8f3ff;
      color: #165dff;
    }
    .todo {
      background-color: #165dff;
      color: #fff;
    }
    .unFinish {
      background-color: #f2f3f5;
      color: #4e5969;
    }
    .stepTitle {
      font-size: 14px;
      margin-left: 10px;
    }
  }
  .stepItem:last-child {
    margin-right: 0;
  }
}
</style>
