appealCard.vue 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. <template>
  2. <div class="otherAppeal">
  3. <div class="title">
  4. {{ otherAppeal.title }}
  5. </div>
  6. <img
  7. src="/static/appeal/waited.png"
  8. class="state"
  9. v-if="otherAppeal.state === 1"
  10. />
  11. <img
  12. src="/static/appeal/waiting.png"
  13. class="state"
  14. v-if="otherAppeal.state === 0"
  15. />
  16. <div class="details" v-if="otherAppeal.state === 1">
  17. <img :src="otherAppeal.image" class="icon" />
  18. <p class="msg">
  19. <span class="name">{{ otherAppeal.name }}</span
  20. >:
  21. <span class="msg_body">{{ otherAppeal.msg }}</span>
  22. </p>
  23. </div>
  24. <div class="details" v-else-if="otherAppeal.state === 0">
  25. <p class="msg">
  26. <span class="msg_body_waiting">{{ otherAppeal.msg }}</span>
  27. </p>
  28. </div>
  29. <div class="details" v-else>
  30. <img :src="otherAppeal.image" class="icon" />
  31. <p class="msg">
  32. <span class="name">{{ otherAppeal.name }}</span
  33. >:
  34. <span class="msg_body">{{ otherAppeal.msg }}</span>
  35. </p>
  36. </div>
  37. </div>
  38. </template>
  39. <script>
  40. export default {
  41. props: ["otherAppeal"],
  42. };
  43. </script>
  44. <style lang="scss" scoped>
  45. .otherAppeal {
  46. margin: 5% 8%;
  47. position: relative;
  48. height: 200rpx;
  49. .title {
  50. margin-bottom: 5%;
  51. font-size: 28rpx;
  52. }
  53. .state {
  54. position: absolute;
  55. right: 0;
  56. top: 0;
  57. transform: translateY(-30%);
  58. width: 94rpx;
  59. height: 74rpx;
  60. }
  61. .details {
  62. position: relative;
  63. .name {
  64. font-size: 25rpx;
  65. color: red;
  66. }
  67. .msg {
  68. font-size: 25rpx;
  69. overflow: hidden;
  70. text-overflow: ellipsis;
  71. display: -webkit-box;
  72. -webkit-box-orient: vertical;
  73. -webkit-line-clamp: 3;
  74. word-wrap: break-word;
  75. word-break: break-all;
  76. line-height: 40rpx;
  77. letter-spacing: 2rpx;
  78. .msg_body_waiting {
  79. color: #aaa;
  80. }
  81. }
  82. .icon {
  83. width: 50rpx;
  84. height: 50rpx;
  85. position: absolute;
  86. transform: translateX(-100%);
  87. }
  88. }
  89. }
  90. </style>