scroll-list-card-chengji.vue 2.1 KB

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