messageCard.vue 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. <template>
  2. <view class="message-card">
  3. <view class="card-info-content">
  4. <view class="left-icon">
  5. <image style="width: 100%;height: 100%;" src="../../../static/images/index/icon1.svg" mode="scaleToFill"></image>
  6. </view>
  7. <view class="right-content">
  8. <view class="header">
  9. <view class="name">
  10. {{ message.name }}
  11. </view>
  12. <view class="time">
  13. {{ message.time }}
  14. </view>
  15. </view>
  16. <view class="body">
  17. {{ message.remark }}
  18. </view>
  19. </view>
  20. </view>
  21. </view>
  22. </template>
  23. <script setup>
  24. import { defineProps } from 'vue';
  25. const props = defineProps({
  26. message:{
  27. type: Object,
  28. default: ()=>{
  29. return {}
  30. }
  31. }
  32. })
  33. </script>
  34. <style lang="scss" scoped>
  35. .message-card{
  36. background: #FFFFFF;
  37. border-radius: 12rpx;
  38. padding: 20rpx;
  39. margin-bottom: 20rpx;
  40. .card-info-content{
  41. display: flex;
  42. align-items: center;
  43. .left-icon{
  44. width: 114rpx;
  45. height: 114rpx;
  46. flex-shrink: 0;
  47. }
  48. .right-content{
  49. width: calc(100% - 114rpx);
  50. display: flex;
  51. flex-direction: column;
  52. height: 100rpx;
  53. justify-content: space-between;
  54. .header{
  55. display: flex;
  56. justify-content: space-between;
  57. align-items: center;
  58. .name{
  59. font-family: 思源黑体;
  60. font-size: 36rpx;
  61. color: $uni-text-color;
  62. }
  63. .time{
  64. font-family: 思源黑体;
  65. font-size: 26rpx;
  66. color: $uni-text-color-grey;
  67. }
  68. }
  69. .body{
  70. width: 100%;
  71. white-space: nowrap;
  72. overflow: hidden;
  73. text-overflow: ellipsis;
  74. font-family: 思源黑体;
  75. font-size: 26rpx;
  76. color: $uni-text-color;
  77. }
  78. }
  79. }
  80. }
  81. </style>