log-item.vue 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <!-- 售后日志的每一项展示 -->
  2. <template>
  3. <view class="log-item ss-flex">
  4. <view class="log-icon ss-flex-col ss-col-center ss-m-r-20">
  5. <text class="cicon-title" :class="index === 0 ? 'activity-color' : ''" />
  6. <view v-if="data.length - 1 !== index" class="line" />
  7. </view>
  8. <view>
  9. <view class="text">{{ item.content }}</view>
  10. <view class="date">
  11. {{ sheep.$helper.timeFormat(item.createTime, 'yyyy-mm-dd hh:MM:ss') }}
  12. </view>
  13. </view>
  14. </view>
  15. </template>
  16. <script setup>
  17. import sheep from '@/sheep';
  18. const props = defineProps({
  19. item: {
  20. type: Object, // 当前日志
  21. default() {},
  22. },
  23. index: {
  24. type: Number, // item 在 data 的下标
  25. default: 0,
  26. },
  27. data: {
  28. type: Object, // 日志列表
  29. default() {},
  30. },
  31. });
  32. </script>
  33. <style lang="scss" scoped>
  34. .log-item {
  35. align-items: stretch;
  36. }
  37. .log-icon {
  38. height: inherit;
  39. .cicon-title {
  40. font-size: 30rpx;
  41. color: #dfdfdf;
  42. }
  43. .activity-color {
  44. color: #60bd45;
  45. }
  46. .line {
  47. width: 1px;
  48. height: 100%;
  49. background: #dfdfdf;
  50. }
  51. }
  52. .text {
  53. font-size: 28rpx;
  54. font-weight: 500;
  55. color: #333333;
  56. }
  57. .richtext {
  58. font-size: 24rpx;
  59. font-weight: 500;
  60. color: #999999;
  61. margin: 20rpx 0 0 0;
  62. }
  63. .content-img {
  64. margin-top: 20rpx;
  65. width: 200rpx;
  66. height: 200rpx;
  67. }
  68. .date {
  69. margin-top: 20rpx;
  70. font-size: 24rpx;
  71. font-family: OPPOSANS;
  72. font-weight: 400;
  73. color: #999999;
  74. margin-bottom: 40rpx;
  75. }
  76. </style>