index.vue
1.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<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"
aria-hidden="true"
class="absolute left-3.5 top-8 -ml-px h-full w-[2px] bg-gray-200">
</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 v-for="value in item.desc"
:key="value"
class="mt-[4px] text-[12px] font-normal text-[#969AA3]">
<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>