鸿宇研学生前端代码
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.

112 lines
2.4 KiB

  1. <template>
  2. <view class="records__view">
  3. <uv-steps direction="column">
  4. <uv-steps-item v-for="(record, index) in list" :key="record.id">
  5. <template #icon>
  6. <view class="flex mark is-active" v-if="index === 0">
  7. <image class="icon" src="@/static/image/icon-mark-highlight.png" mode="widthFix"></image>
  8. </view>
  9. <view class="flex mark" v-else>
  10. <image class="icon" src="@/static/image/icon-mark.png" mode="widthFix"></image>
  11. </view>
  12. </template>
  13. <template #title>
  14. <view class="title" @click="onClickActivity(record.id)">{{ record.createTime }}</view>
  15. </template>
  16. <template #desc>
  17. <view class="content" @click="onClickActivity(record.id)">
  18. <view class="desc">{{ record.name }}</view>
  19. <view class="image">
  20. <view class="image-item" v-for="(image, imgIdx) in record.image" :key="imgIdx">
  21. <image class="img" :src="image" mode="scaleToFill"></image>
  22. </view>
  23. </view>
  24. </view>
  25. </template>
  26. </uv-steps-item>
  27. </uv-steps>
  28. </view>
  29. </template>
  30. <script>
  31. export default {
  32. props: {
  33. list: {
  34. type: Array,
  35. default() {
  36. return []
  37. }
  38. }
  39. },
  40. methods: {
  41. onClickActivity(id) {
  42. this.$utils.navigateTo(`/pages_order/growing/activity/index?id=${id}`)
  43. },
  44. },
  45. }
  46. </script>
  47. <style scoped lang="scss">
  48. .records__view {
  49. padding-left: 40rpx;
  50. }
  51. .mark {
  52. margin-top: 8rpx;
  53. width: 36rpx;
  54. height: 36rpx;
  55. background: #F3F3F3;
  56. border-radius: 50%;
  57. .icon {
  58. width: 24rpx;
  59. height: auto;
  60. }
  61. &.is-active {
  62. background: linear-gradient(to right, #21FEEC, #019AF9);
  63. }
  64. }
  65. .title {
  66. font-family: PingFang SC;
  67. font-size: 36rpx;
  68. font-weight: 600;
  69. line-height: 1.4;
  70. color: $uni-color;
  71. }
  72. .content {
  73. width: calc(100vw - 92rpx);
  74. }
  75. .desc {
  76. font-family: PingFang SC;
  77. font-size: 28rpx;
  78. font-weight: 400;
  79. line-height: 1.4;
  80. color: #191919;
  81. }
  82. .image {
  83. display: flex;
  84. column-gap: 16rpx;
  85. flex-wrap: nowrap;
  86. overflow-x: auto;
  87. &-item {
  88. flex: none;
  89. width: 208rpx;
  90. height: 296rpx;
  91. border: 2rpx solid #CDCDCD;
  92. border-radius: 12rpx;
  93. overflow: hidden;
  94. .img {
  95. width: 100%;
  96. height: 100%;
  97. }
  98. }
  99. }
  100. </style>