<template functional>
  <div class="cps-process-list">
    <div class="cps-process-list-item" v-for="(item, index) in props.processData" :key="index">
      <div class="cps-process-list-item-title">{{ index + 1 }}</div>
      <div class="cps-process-list-item-content">
        <h6>{{ item.title }}</h6>
        <small v-html="item.desc"></small>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "CpsProcessDetail",
  processData: {
    type: Array,
    default() {
      return [];
    }
  }
};
</script>

<style lang="less" scoped>
@import "../../../../style/var.less";
@import "../../../../style/mixins.less";
.cps-process {
  &-list {
    margin-bottom: 50px;
    &-item {
      position: relative;
      display: flex;
      padding-bottom: 16px;
      &-title {
        font-size: @font-size-12;
        font-weight: @font-weight-bold;
        color: @black;
        width: 19px;
        height: 19px;
        margin: 0 20px 0 4px;
        background-color: @orange-light;
        border-radius: @border-radius-max;
        line-height: @line-height-md;
        position: relative;
        text-align: center;
        line-height: 19px;
      }
      &-content {
        flex: 1;
        background-color: #f6f6f6;
        border-radius: @border-radius-sm / 2 @border-radius-md;
        padding: @padding-sm;
        h6 {
          color: @black;
          font-weight: @font-weight-bold;
          font-size: @font-size-14;
          line-height: @line-height-sm + 2;
        }
        small {
          color: @gray-5;
          font-size: @font-size-12;
          line-height: @line-height-sm + 2;
        }
      }
      &:last-child {
        color: #fff;
        padding-bottom: 0;
        &::after {
          display: none;
        }
      }
      &::after {
        content: " ";
        display: block;
        position: absolute;
        top: 19px;
        left: 13px;
        width: 0;
        height: 100%;
        border-left: 1px solid #d8d8d8;
      }
    }
  }
}
</style>
