<template>
  <view class="step-register">
    <image class="competition-title" :src="staticImg.competitionTitle" />
    <view class="step-line">
      <view class="dashed-line-list">
        <view class="dashed-line" style="width: 172rpx" />
        <view
          :class="['dashed-line', isStepOne ? 'op3' : '']"
          style="width: 234rpx"
        />
        <view
          :class="['dashed-line', isStepOne ? 'op3' : '']"
          style="width: 172rpx"
        />
      </view>

      <view class="step-title-list">
        <view class="step-one">
          <view class="red-circle">
            <view class="red-dot" />
          </view>
          <view class="step-title">1.签署纲领</view>
        </view>
        <view :class="['step-two', isStepOne ? 'op3' : '']">
          <view class="red-circle">
            <view class="red-dot" />
          </view>
          <view class="step-title">2.填写信息</view>
        </view>
      </view>
    </view>
  </view>
</template>

<script>
const staticImg = {
  competitionTitle: require("@/static/competitionRegister/common/competition-title.png"),
};

export default {
  name: "step-register",
  props: {
    isStepOne: {
      type: Boolean,
      default: false,
    },
  },
  data() {
    return {
      staticImg,
    };
  },
};
</script>

<style lang="less" scoped>
.step-register {
  width: 100vw;
  height: 234rpx;
  // padding: 42rpx 0rpx;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  .competition-title {
    width: 552rpx;
    height: 52rpx;
  }
  .step-line {
    width: 100vw;
    margin-top: 66rpx;
    .dashed-line-list {
      display: flex;
      justify-content: space-between;
      align-items: center;
      .dashed-line {
        height: 4rpx;
        background-image: linear-gradient(
          to right,
          red 0%,
          red 50%,
          transparent 0%
        );
        background-size: 20rpx 1rpx;
        background-repeat: repeat-x;
      }
    }

    .step-title-list {
      width: 100vw;
      position: relative;
      margin: 0 auto;
      font-size: 24rpx;
      font-family: PingFangSC-Semibold, PingFang SC;
      font-weight: 600;
      color: #ff6271;
      .step-one {
        width: 112rpx;
        position: absolute;
        left: 157rpx;
        top: -20rpx;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
      }
      .step-title {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
      }
      .step-two {
        position: absolute;
        right: 160rpx;
        top: -20rpx;
        // width: 118rpx;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
      }

      .red-circle {
        width: 36rpx;
        height: 36rpx;
        background: #ffffff;
        border-radius: 50%;
        border: 2rpx solid #ff7e8a;
        display: flex;
        justify-content: center;
        align-items: center;
        margin-bottom: 10rpx;
        .red-dot {
          width: 24rpx;
          height: 24rpx;
          border-radius: 50%;
          background: #ff7e8a;
        }
      }
    }
  }
}
.op3 {
  opacity: 0.3;
}
</style>

整个世界都在用
炽热的永远
宣称自己在爱上的笨拙

