<!-- 步骤条 -->
<template>
  <!-- <vue-scroll style="height: 100%"> -->
    <div class="list progress">
      <div class="list-item progress-item" v-for="(item, index) in list" :key="index">
        <div :class="['progress-item-dot', { active: item.active }]"></div>
        <div class="info">
          <span class="label">{{ item.label }}</span>
          <span class="value">{{ item.value }}</span>
        </div>
      </div>
    </div>
  <!-- </vue-scroll> -->
</template>

<script>
export default {
  props: {
    list: {
      type: Array,
      default: () => []
    }
  }
}
</script>

<style lang="scss" scoped>
.progress {
  display: flex;
  align-items: center;

  width: 100%;
  height: 100%;

  .progress-item {
    position: relative;
    display: flex;
    flex-shrink: 0;
    flex-direction: column;
    align-items: center;
    width: 150px;
    color: #fff;

    .progress-item-dot {
      width: 8px;
      height: 8px;
      background-color: #fff;
      border-radius: 50%;

      &::after {
        content: '';
        position: absolute;
        top: 3px;
        transform: translateX(-99%);
        display: block;
        width: 150px;
        height: 2px;
        background: #fff;
      }

      &.active {
        &::after {
          background: #6dc6d8;
        }
      }

      &::before {
        content: '';
        position: relative;
        z-index: 9;
        display: block;
        width: 8px;
        height: 8px;
        background-color: #fff;
        border-radius: 50%;
      }
    }

    .info {
      display: flex;
      flex-direction: column;
      align-items: center;
      margin-top: 10px;
      height: 60px;
      .label {
        margin-bottom: 20px;
      }
    }

    &:first-child {
      .progress-item-dot {
        &::after {
          display: none;
        }
      }
    }
  }
}
</style>
