123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104 |
- <template>
- <div class="step-container">
- <div v-for="(item, index) in stepData.items" :key="index" class="step">
- <div class="step-content">
- <div class="step-item">
- <div v-if="stepData.active > index" class="complete-tag"></div>
- <div v-else-if="stepData.active == index" class="active-tag">{{ index + 1 }}</div>
- <div v-else-if="stepData.active < index" class="tag">{{ index + 1 }}</div>
- <div class="step-title">{{ item.title }}</div>
- </div>
- <div class="step-time">{{ item.description }}</div>
- </div>
- <div v-if="index !== stepData.items.length - 1" class="step-line" />
- </div>
- </div>
- </template>
- <script lang="ts" setup>
- const props = defineProps({
- stepData: []
- });
- </script>
- <style lang="scss" scoped>
- .step-container {
- display: flex;
- width: 100%;
- .step {
- display: flex;
- align-items: center;
- flex: 1;
- height: 67px;
- &:last-child {
- width: 121px;
- flex: unset;
- }
- .step-content {
- display: flex;
- flex-direction: column;
- position: relative;
- .step-item {
- display: flex;
- align-items: center;
- .step-title {
- white-space: nowrap;
- }
- }
- .step-time {
- position: absolute;
- top: 30px;
- left: 20px;
- font-size: 14px;
- color: rgba(0, 0, 0, 0.65);
- width: 100%;
- }
- }
- }
- .step-line {
- width: calc(100% - 100px);
- height: 1px;
- margin: 0 15px 0 33px;
- background-image: linear-gradient(90deg, #00fce7 5%, #2c81ff 100%);
- }
- .tag {
- color: rgba(0, 0, 0, 0.25);
- border: 1px solid rgba(0, 0, 0, 0.25);
- border-radius: 50%;
- width: 32px;
- height: 32px;
- display: flex;
- justify-content: center;
- align-items: center;
- font-family: HelveticaNeue;
- margin-right: 8px;
- }
- .complete-tag {
- color: #fff;
- border: 1px solid #1890FF;
- border-radius: 50%;
- width: 32px;
- height: 32px;
- display: flex;
- justify-content: center;
- align-items: center;
- font-family: HelveticaNeue;
- margin-right: 8px;
- position: relative;
- background: url('@/assets/images/check.png') no-repeat;
- background-size: 100% 100%;
- }
- .active-tag {
- color: #fff;
- width: 32px;
- height: 32px;
- background: url('@/assets/images/circle.png') no-repeat;
- background-size: 100% 100%;
- display: flex;
- justify-content: center;
- align-items: center;
- font-family: HelveticaNeue;
- margin-right: 8px;
- }
- }
- </style>
|