index.vue 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. <template>
  2. <view class="notification">
  3. <view class="notification-title">
  4. <view class="notification-title-left">
  5. 最新消息
  6. </view>
  7. <view class="notification-title-right">
  8. <!-- 查看全部 <uni-icons type="forward" size="14"></uni-icons> -->
  9. </view>
  10. </view>
  11. <view class="notification-body">
  12. <view v-for="(item,index) in list" :key="index" class="notification-body-item">
  13. <view class="notification-body-item-color">
  14. </view>
  15. <view class="notification-body-item-content">
  16. {{item.title}}
  17. </view>
  18. <view class="notification-body-item-date">
  19. {{item.created_at}}
  20. </view>
  21. </view>
  22. </view>
  23. </view>
  24. </template>
  25. <script>
  26. export default {
  27. props: {
  28. list: {
  29. default: () => [],
  30. type: Array
  31. }
  32. },
  33. data() {
  34. return {
  35. }
  36. },
  37. methods: {
  38. }
  39. }
  40. </script>
  41. <style lang="scss" scoped>
  42. .notification {
  43. width: 100%;
  44. background: #ffffff;
  45. border-radius: 5.33px;
  46. box-shadow: 0px 0px 6.67px 0px rgba(147, 147, 147, 0.20);
  47. padding: 28rpx;
  48. box-sizing: border-box;
  49. .notification-title {
  50. display: flex;
  51. justify-content: space-between;
  52. color: #999;
  53. font-size: 24rpx;
  54. line-height: 25rpx;
  55. height: 50rpx;
  56. }
  57. .notification-body-item {
  58. display: flex;
  59. align-items: center;
  60. font-size: 24rpx;
  61. height: 50rpx;
  62. line-height: 50rpx;
  63. color: #999;
  64. .notification-body-item-color {
  65. width: 10rpx;
  66. height: 10rpx;
  67. border-radius: 50%;
  68. margin-right: 20rpx;
  69. background-color: #FDAD45;
  70. }
  71. .notification-body-item-content {
  72. flex: 1;
  73. }
  74. }
  75. }
  76. </style>