You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

order-logistics.vue 2.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. <!-- 订单物流 -->
  2. <template>
  3. <view :class="['as-layout-horizontal', index as any === 0?'active':'', flag === 2 ? 'logistics-gray' : '']" style="overflow: visible" v-for="(item,index) in options" :key="index">
  4. <view class="logistics-layout">
  5. <view class="logistics-layout-top">
  6. <view class="title" :style="index as any === 0 ? 'color:#00B38B' : 'color:#333'">
  7. {{(item as ItemType).title}}
  8. </view>
  9. <view class="more" v-if="(item as ItemType).right" @click="emit('more')">
  10. <span class="label">详细信息</span>
  11. <image class="arror" :src="`${$imgUrl}common/arror-right-green.png`"></image>
  12. </view>
  13. </view>
  14. <view class="desc">
  15. {{(item as ItemType).desc}}
  16. </view>
  17. </view>
  18. </view>
  19. </template>
  20. <script setup lang="ts">
  21. import { PropType } from "vue";
  22. interface ItemType{
  23. title:string,
  24. desc:string,
  25. right?:boolean,
  26. }
  27. const emit = defineEmits(['more'])
  28. const props = defineProps({
  29. //数据列表
  30. options:{
  31. type:Array as PropType<ItemType[]>,
  32. default: () => ([])
  33. },
  34. //1-列表 2-详情
  35. flag:{
  36. type:Number,
  37. default: 1
  38. }
  39. })
  40. console.log(props.flag)
  41. </script>
  42. <style lang="scss" scoped>
  43. .as-layout-horizontal{
  44. border-left: 1px solid #00B38B;
  45. padding-bottom: 45rpx;
  46. margin-top: 18rpx;
  47. position: relative;
  48. &::after{
  49. content: '';
  50. left: -10rpx;
  51. top: -18rpx;
  52. position: absolute;
  53. width: 18rpx;
  54. height: 18rpx;
  55. border-radius: 50%;
  56. border: 1px solid #00B38B;
  57. box-sizing: border-box;
  58. }
  59. &:last-child{
  60. border-left: none;
  61. padding-bottom: 0px;
  62. &::after{
  63. left: -8.5rpx;
  64. }
  65. }
  66. .logistics-layout{
  67. padding-left: 34rpx;
  68. &-top{
  69. width: 100%;
  70. display: flex;
  71. margin-top: -30rpx;
  72. align-items: center;
  73. .more{
  74. display: flex;
  75. align-items: center;
  76. .label{
  77. font-size: 24rpx;
  78. color: #00B38B;
  79. }
  80. .arror{
  81. width: 30rpx;
  82. height: 30rpx;
  83. }
  84. }
  85. }
  86. .title{
  87. font-size: 30rpx;
  88. color: #00B38B;
  89. flex: 1;
  90. }
  91. .desc{
  92. font-size: 24rpx;
  93. margin-top: 20rpx;
  94. color: #999999;
  95. line-height: 25px;
  96. }
  97. }
  98. }
  99. .logistics-gray{
  100. border-color: #DCDCDC;
  101. &::after{
  102. background-color: #DCDCDC;
  103. border: none;
  104. }
  105. }
  106. .active{
  107. position: relative;
  108. &::after{
  109. content: '';
  110. position: absolute;
  111. width: 18rpx;
  112. height: 18rpx;
  113. left:-10rpx;
  114. border-radius: 50%;
  115. background-color: #00B38B;
  116. }
  117. }
  118. </style>