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

111 lines
2.3 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">{{ record.name }}</view>
  15. </template>
  16. <template #desc>
  17. <view class="content">
  18. <view class="list">
  19. <view class="flex flex-column list-item" v-for="(child, cIdx) in record.children" :key="cIdx">
  20. <image class="list-item-icon" :src="child.icon" mode="aspectFill"></image>
  21. <view class="list-item-title">{{ child.label }}</view>
  22. <view class="list-item-desc">{{ child.createTime }}</view>
  23. </view>
  24. </view>
  25. </view>
  26. </template>
  27. </uv-steps-item>
  28. </uv-steps>
  29. </view>
  30. </template>
  31. <script>
  32. export default {
  33. props: {
  34. list: {
  35. type: Array,
  36. default() {
  37. return []
  38. }
  39. }
  40. },
  41. }
  42. </script>
  43. <style scoped lang="scss">
  44. .records__view {
  45. padding-left: 40rpx;
  46. }
  47. .mark {
  48. margin-top: 8rpx;
  49. width: 36rpx;
  50. height: 36rpx;
  51. background: #F3F3F3;
  52. border-radius: 50%;
  53. .icon {
  54. width: 24rpx;
  55. height: auto;
  56. }
  57. &.is-active {
  58. background: linear-gradient(to right, #21FEEC, #019AF9);
  59. }
  60. }
  61. .title {
  62. font-family: PingFang SC;
  63. font-size: 30rpx;
  64. font-weight: 500;
  65. line-height: 1.4;
  66. color: #191919;
  67. }
  68. .content {
  69. width: calc(100vw - 92rpx);
  70. }
  71. .list {
  72. display: flex;
  73. flex-wrap: nowrap;
  74. overflow-x: auto;
  75. font-family: PingFang SC;
  76. line-height: 1.4;
  77. &-item {
  78. flex: none;
  79. row-gap: 4rpx;
  80. width: 206rpx;
  81. height: 226rpx;
  82. &-icon {
  83. width: 110rpx;
  84. height: 110rpx;
  85. }
  86. &-title {
  87. font-size: 28rpx;
  88. font-weight: 500;
  89. color: #080808;
  90. }
  91. &-desc {
  92. font-size: 26rpx;
  93. font-weight: 400;
  94. color: #999999;
  95. }
  96. }
  97. }
  98. </style>