鸿宇研学生前端代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

94 lines
1.7 KiB

  1. <template>
  2. <view class="flex card">
  3. <view class="radio" v-if="showRadio">
  4. <uv-radio :name="data.id"></uv-radio>
  5. </view>
  6. <view class="info">
  7. <view class="title">{{ typeDesc }}</view>
  8. <view class="row">
  9. <view class="row-label">绑定人</view>
  10. <view class="row-content">{{ data.name }}</view>
  11. </view>
  12. <view class="row">
  13. <view class="row-label">申请人ID</view>
  14. <view class="row-content">{{ data.userId }}</view>
  15. </view>
  16. </view>
  17. </view>
  18. </template>
  19. <script>
  20. const TYPE_AND_DESC_MAPPING = {
  21. 0: '学生',
  22. 1: '家长',
  23. }
  24. export default {
  25. props: {
  26. data: {
  27. type: Object,
  28. default() {
  29. return {}
  30. }
  31. },
  32. value: {
  33. type: String,
  34. default: null,
  35. },
  36. showRadio: {
  37. type: Boolean,
  38. default: false
  39. },
  40. },
  41. data() {
  42. return {
  43. }
  44. },
  45. computed: {
  46. typeDesc() {
  47. const { type } = this.data
  48. return TYPE_AND_DESC_MAPPING[type] || ''
  49. },
  50. },
  51. methods: {
  52. },
  53. }
  54. </script>
  55. <style scoped lang="scss">
  56. .card {
  57. justify-content: flex-start;
  58. column-gap: 24rpx;
  59. padding: 40rpx 32rpx;
  60. font-family: PingFang SC;
  61. font-weight: 400;
  62. line-height: 1.4;
  63. background: #FFFFFF;
  64. border-radius: 32rpx;
  65. }
  66. .title {
  67. font-size: 32rpx;
  68. font-weight: 500;
  69. color: #181818;
  70. }
  71. .row {
  72. margin-top: 16rpx;
  73. display: flex;
  74. align-items: center;
  75. justify-content: flex-start;
  76. column-gap: 4rpx;
  77. font-size: 28rpx;
  78. &-label {
  79. color: #8B8B8B;
  80. }
  81. &-content {
  82. color: #393939;
  83. }
  84. }
  85. </style>