scroll-list-card-kechengji.vue 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. <template>
  2. <view class="scroll-list-card mobile-card-box">
  3. <view>
  4. <img style="width: 100rpx;height: 100rpx;;" :src="data.pic" alt="" />
  5. </view>
  6. <text>{{data.kcName === null ? '':data.kcName}}</text>
  7. <view class="timeSpan">时间:{{data.answerStartTime === null ? '': data.answerStartTime}}</view>
  8. <view class="timeSpan">总分:{{data.ksScore === null ? '': data.ksScore}}</view>
  9. </view>
  10. </template>
  11. <script setup>
  12. import {
  13. toRefs,
  14. ref,
  15. computed
  16. } from "vue";
  17. const props = defineProps({
  18. data: {
  19. type: Object,
  20. },
  21. });
  22. const {
  23. data
  24. } = toRefs(props);
  25. </script>
  26. <style lang="scss" scoped>
  27. .mobile-card-box {
  28. box-sizing: border-box;
  29. margin: 0 30rpx 10rpx;
  30. border-bottom: 2rpx solid #f2f1f2;
  31. padding-bottom: 30rpx;
  32. }
  33. .mobile-card-title {
  34. color: #333;
  35. font-size: 32rpx;
  36. font-weight: 500;
  37. margin: 24rpx 0 24rpx 0;
  38. text-overflow: ellipsis;
  39. -o-text-overflow: ellipsis;
  40. overflow: hidden;
  41. word-wrap: break-word;
  42. display: -webkit-box;
  43. white-space: normal;
  44. -webkit-box-orient: vertical;
  45. text-align: justify;
  46. -webkit-line-clamp: 2;
  47. line-clamp: 2;
  48. line-height: 48rpx;
  49. }
  50. // 行
  51. .mobile-card-row {
  52. margin-bottom: 32rpx;
  53. display: flex;
  54. justify-content: space-between;
  55. align-items: flex-end;
  56. text {
  57. font-size: 28rpx;
  58. line-height: 40rpx;
  59. }
  60. // 得分
  61. .mobile-card-score {
  62. font-size: 40rpx;
  63. color: #f10a0a;
  64. }
  65. // 分数(有最小宽度)
  66. .card-score-box {
  67. min-width: 240rpx;
  68. text-align: left;
  69. }
  70. }
  71. // 按钮
  72. .mobile-card-btn {
  73. width: 60%;
  74. height: 80rpx;
  75. line-height: 80rpx;
  76. margin: 50rpx auto;
  77. background: linear-gradient(0deg, #436aff 0%, #234ff7 100%);
  78. border-radius: 80rpx;
  79. display: block;
  80. }
  81. </style>