index.vue 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. <template>
  2. <view class="oa-timeLine-item">
  3. <view class="oa-timeLine-item-header">
  4. <view class="oa-timeLine-item-header-icon">
  5. <u-icon name="info-circle-fill" :color="iconColor" size="18"></u-icon>
  6. </view>
  7. <view class="oa-timeLine-item-header-cont">
  8. <view class="title">
  9. {{ titleValue }}
  10. </view>
  11. <!-- <view style="margin: auto"> </view> -->
  12. <view class="time">
  13. {{ timeValue }}
  14. </view>
  15. </view>
  16. </view>
  17. <view class="oa-timeLine-item-content">
  18. <view class="oa-timeLine-item-content-icon">
  19. <view class="icon"></view>
  20. </view>
  21. <view class="oa-timeLine-item-content-cont">
  22. <slot class="content"></slot>
  23. </view>
  24. </view>
  25. </view>
  26. </template>
  27. <script setup>
  28. import { toRefs } from "vue";
  29. const props = defineProps({
  30. titleValue: {
  31. type: String,
  32. default: "",
  33. },
  34. timeValue: {
  35. type: String,
  36. default: "",
  37. },
  38. iconColor: {
  39. type: String,
  40. default: "#149eff",
  41. },
  42. });
  43. const { titleValue, timeValue, iconColor } = toRefs(props);
  44. </script>
  45. <style lang="scss" scoped>
  46. .oa-timeLine-item {
  47. .oa-timeLine-item-header {
  48. display: flex;
  49. height: 25px;
  50. line-height: 25px;
  51. .oa-timeLine-item-header-icon {
  52. margin: auto 0;
  53. }
  54. .oa-timeLine-item-header-cont {
  55. display: flex;
  56. width: calc(100% - 18px - 15px);
  57. margin-left: 15px;
  58. .title {
  59. font-size: 15px;
  60. color: #000000;
  61. overflow: hidden; //超出的文本隐藏
  62. text-overflow: ellipsis; //溢出用省略号显示
  63. white-space: nowrap; // 默认不换行;
  64. }
  65. .time {
  66. font-size: 14px;
  67. color: #b5b5b5;
  68. margin-left: auto;
  69. }
  70. }
  71. }
  72. .oa-timeLine-item-content {
  73. display: flex;
  74. .oa-timeLine-item-content-icon {
  75. width: 18px;
  76. display: flex;
  77. .icon {
  78. width: 2px;
  79. background-color: #e4e7ed;
  80. margin: -5px auto;
  81. }
  82. }
  83. .oa-timeLine-item-content-cont {
  84. width: 100%;
  85. margin: 15px 0px 15px 15px;
  86. padding: 15px;
  87. background-color: #fff;
  88. border-radius: 10px;
  89. }
  90. }
  91. }
  92. // .oa-timeLine-item:last-child {
  93. // .oa-timeLine-item-content {
  94. // .oa-timeLine-item-content-icon {
  95. // .icon {
  96. // margin-bottom: 15px;
  97. // }
  98. // }
  99. // }
  100. // }
  101. </style>