scroll-list-card-chengji.vue 1.8 KB

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