record.vue 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <template>
  2. <view v-if="list && list.length > 0">
  3. <u-cell v-for="(item, index) in list" :key="index" :isLink="true" :border="true" @click="$emit('click', item)">
  4. <u-avatar slot="icon" :bg-color="item.noticeType == 2 ? '#2979ff' : '#19be6b'" :text="item.noticeType == 2 ? '公' : '通'" shape="square"></u-avatar>
  5. <view slot="title" class="notice-record-title">{{item.noticeTitle}}</view>
  6. <view slot="label" class="notice-record-desc">
  7. <view style="display: flex;">
  8. <u-icon name="clock" size="12"></u-icon>
  9. <text>{{item.createTime}}</text>
  10. </view>
  11. <view style="display: flex; margin-left: 16px;">
  12. <u-icon name="account" size="12"></u-icon>
  13. <text>{{item.remark}}</text>
  14. </view>
  15. </view>
  16. </u-cell>
  17. <!-- <u-loadmore :status="status" /> -->
  18. </view>
  19. <u-empty v-else></u-empty>
  20. </template>
  21. <script>
  22. export default {
  23. props: {
  24. list: {
  25. type: Array,
  26. default: []
  27. },
  28. status: String
  29. }
  30. }
  31. </script>
  32. <style lang="scss" scoped>
  33. /deep/.u-cell__body {
  34. padding: 8px 0 !important;
  35. }
  36. .notice-record {
  37. display: flex;
  38. padding: 16px 0;
  39. &-content {
  40. margin-left: 8px;
  41. }
  42. &-title {
  43. font-size: 18px;
  44. font-weight: bold;
  45. overflow: hidden;
  46. text-overflow: ellipsis;
  47. display: -webkit-box;
  48. -webkit-line-clamp: 2;
  49. -webkit-box-orient: vertical;
  50. }
  51. &-title .read {
  52. color: #ccc;
  53. }
  54. &-desc {
  55. padding: 4px 0;
  56. font-size: 12px;
  57. color: #909399;
  58. display: flex;
  59. }
  60. }
  61. </style>