index.vue 1.55 KB
<template>
  <div class="pl-2">
    <div
      v-for="(item, index) in workflowSteps"
      :key="index"
      class="relative pb-8 last:pb-0"
    >
      <!-- 连接线 -->
      <div
        v-if="index !== workflowSteps.length - 1"
        class="absolute left-3.5 top-8 -ml-px h-full w-[2px] bg-gray-200"
        aria-hidden="true"
      ></div>

      <div class="group relative flex items-start">
        <!-- 步骤数字 -->
        <span
          class="flex h-7 w-7 items-center justify-center rounded-full bg-blue-50 ring-4 ring-white"
        >
          <span class="text-sm font-bold text-blue-600">{{ index + 1 }}</span>
        </span>
        <!-- 步骤内容 -->
        <div class="ml-4 min-w-0 flex-1">
          <h4 class="mb-1 text-[14px] font-normal text-[#2F3133]">
            {{ item.title }}
          </h4>
          <div v-if="Array.isArray(item.desc)">
            <p
            class="mt-[4px] text-[12px] font-normal text-[#969AA3]"
            v-for="value in item.desc"
          >
            <span
              class="mb-[2px] mr-[4px] inline-block h-[5px] w-[5px] rounded-[3px] bg-[#1956FE]"
            ></span>
            {{ value }}
          </p>
          </div>
          <div v-else>
            <p class="mt-[4px] text-[12px] font-normal text-[#969AA3]">
              {{ item.desc }}
            </p>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script setup>
import { defineProps } from 'vue';
const props = defineProps({
  workflowSteps: {
    type: Array,
    required: true,
  },
});
</script>