123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195 |
- <template>
- <div class="steps-box">
- <div
- class="steps-item"
- v-for="(step, index) in stepList"
- :key="index"
- :class="{ active: index + 1 == activeIndex }"
- >
- <div class="left-box">
- <slot name="left" :index="index" :data="step">
- <div class="time-box">
- <span class="date">{{ step.date || "" }}</span>
- <span class="time">{{ step.time || "" }}</span>
- </div>
- </slot>
- </div>
- <div class="icon-box">
- <slot name="icon" :index="index" :data="step">
- <div class="icon-content">
- <img
- class="node-box active"
- src="../../../../assets/img/activesteps.png"
- v-if="index + 1 == activeIndex"
- />
- <img
- v-else
- class="node-box"
- src="../../../../assets/img/noActivesteps.png"
- />
- </div>
- </slot>
- </div>
- <div class="right-box">
- <slot name="title" :index="index" :data="step">
- <div class="title-info">
- <div class="title">{{ step.title || "" }}</div>
- <div class="right-item">
- <div class="depart">{{ step.depart || "" }}</div>
- <div class="name">{{ step.name || "" }}</div>
- </div>
- </div>
- </slot>
- <slot
- v-if="step.describeSlot"
- :name="step.describeSlot"
- :index="index"
- :data="step"
- ></slot>
- <slot v-else name="describe" :index="index" :data="step">
- <div class="describe-box"></div>
- </slot>
- </div>
- </div>
- </div>
- </template>
- <script setup>
- const props = defineProps({
- stepList: {
- type: Array,
- default: () => [],
- },
- activeIndex: {
- type: [Number, String],
- default: "",
- },
- });
- </script>
- <style lang="scss" scoped>
- .steps-box {
- padding: 10px;
- .steps-item {
- display: flex;
- min-height: 100px;
- .left-box {
- .time-box {
- display: flex;
- flex-direction: column;
- }
- .date,
- .time {
- font-family: YouSheBiaoTiHei;
- color: #50e0ff;
- white-space: nowrap;
- text-align: left;
- font-style: normal;
- text-transform: none;
- }
- .date {
- font-size: 21px;
- }
- .time {
- font-size: 19px;
- }
- }
- .icon-box {
- width: 40px;
- margin-left: 10px;
- margin-top: 5px;
- .icon-content {
- height: 100%;
- width: 100%;
- position: relative;
- .node-box {
- position: relative;
- width: 30px;
- height: 30px;
- z-index: 3;
- &.active {
- position: relative;
- left: -6px;
- width: 40px;
- height: 40px;
- }
- }
- &::after {
- position: absolute;
- content: "";
- width: 3px;
- background-color: #23aad367;
- top: 0;
- bottom: -7px;
- left: 14px;
- }
- }
- }
- .right-box {
- margin-left: 12px;
- padding-bottom: 25px;
- .title-info {
- display: flex;
- .title {
- min-width: 79px;
- height: 32px;
- line-height: 32px;
- font-family: Alibaba PuHuiTi;
- font-weight: normal;
- font-size: 20px;
- color: #50e0ff;
- text-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
- text-align: left;
- font-style: normal;
- text-transform: none;
- }
- .right-item {
- display: flex;
- align-items: center;
- padding-left: 10px;
- width: 270px;
- height: 32px;
- margin-left: 20px;
- background: linear-gradient(
- 270deg,
- rgba(62, 174, 255, 0) 0%,
- #1b82cbb1 85%,
- rgba(27, 129, 203, 0.3) 100%
- );
- border-radius: 0px 0px 0px 0px;
- .depart {
- font-family: Alibaba PuHuiTi;
- font-size: 16px;
- color: #50e0ff;
- text-align: left;
- }
- .name {
- font-family: Alibaba PuHuiTi;
- font-weight: normal;
- font-size: 16px;
- color: #ffffff;
- text-align: left;
- margin-left: 20px;
- }
- }
- }
- .describe-box {
- }
- }
- &:first-child {
- .icon-content {
- &::after {
- top: 5px;
- }
- }
- }
- &:last-child {
- .icon-content {
- &::after {
- display: none;
- }
- }
- }
- }
- }
- </style>
|