scroll-list-card-kecheng.vue 1.6 KB

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