searchTimeLine.vue 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <template>
  2. <view class="timeline">
  3. <view class="timelineItem">
  4. <view class="timeItem" v-for="(item, index) in timeList" :key="index">
  5. <view class="line">
  6. <view class="out" :style="{ background: color == '' ? '' : color }">
  7. <view class="inner" :style="{ background: color == '' ? '' : color }"></view>
  8. </view>
  9. </view>
  10. <view class="rightContent">
  11. <view class="time-content"> {{ item.PublishDate }}</view>
  12. <view class="title-content text_twoLine"> {{ item.Title }}</view>
  13. </view>
  14. </view>
  15. </view>
  16. </view>
  17. </template>
  18. <script>
  19. import { Home } from "@/config/api";
  20. export default {
  21. props: {
  22. timeList: {
  23. type: Array,
  24. default: [],
  25. required: true,
  26. },
  27. },
  28. data() {
  29. return {
  30. color: "#376cbb",
  31. };
  32. },
  33. computed: {},
  34. methods: {},
  35. };
  36. </script>
  37. <style lang="scss" scoped>
  38. .container-report-item {
  39. width: 100%;
  40. background: #ffffff;
  41. box-shadow: 0rpx 3rpx 8rpx 0rpx rgba(0, 0, 0, 0.16);
  42. border-radius: 8rpx;
  43. padding: 20rpx;
  44. margin-bottom: 20rpx;
  45. overflow: hidden;
  46. }
  47. .timeline {
  48. padding: 20rpx;
  49. }
  50. .timelineItem {
  51. .timeItem {
  52. display: flex;
  53. margin-top: 10rpx;
  54. .line {
  55. width: 1px;
  56. background: rgba(204, 204, 204, 1);
  57. position: relative;
  58. .out {
  59. position: absolute;
  60. top: 0;
  61. left: 50%;
  62. transform: translateX(-50%);
  63. display: flex;
  64. justify-content: center;
  65. align-items: center;
  66. width: 28rpx;
  67. height: 28rpx;
  68. background: rgba(236, 104, 23, 0.6);
  69. border-radius: 50%;
  70. .inner {
  71. width: 18rpx;
  72. height: 18rpx;
  73. background: rgba(236, 104, 23, 1);
  74. border-radius: 50%;
  75. }
  76. }
  77. }
  78. .rightContent {
  79. flex: 1;
  80. margin-left: 20rpx;
  81. font-size: 24rpx;
  82. height: 110rpx;
  83. .time-content {
  84. color: #666666;
  85. }
  86. .title-content {
  87. color: #376cbb;
  88. line-height: 36rpx;
  89. }
  90. }
  91. }
  92. }
  93. </style>