tipsListCard.vue 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <template>
  2. <view class="question-card__wrap">
  3. <view class="question-card__head">
  4. <view class="question-card__head-title">{{ props.datas ? props.datas.title : '' }}</view>
  5. </view>
  6. <view class="question-card__body">
  7. <view class="question-card__item" v-for="(content, index) in props.datas.lists" :key="index">
  8. <view class="question-card__item-left">
  9. <text class="question-card__item-content">{{index + 1}}. {{ content }}</text>
  10. </view>
  11. </view>
  12. </view>
  13. </view>
  14. </template>
  15. <script setup>
  16. const props = defineProps({
  17. datas: {
  18. type: Object,
  19. default() {
  20. return null
  21. }
  22. }
  23. })
  24. </script>
  25. <style lang="less" scoped>
  26. .question-card__wrap {
  27. width: 100%;
  28. height: auto;
  29. padding: 16rpx 30rpx;
  30. border-radius: 20rpx;
  31. background: #FAFAFA;
  32. }
  33. .question-card__head {
  34. width: 100%;
  35. height: 44rpx;
  36. .question-card__head-title {
  37. font-size: 26rpx;
  38. font-weight: 500;
  39. color: #000;
  40. }
  41. }
  42. .question-card__body {
  43. margin-top: 4px;
  44. .question-card__item {
  45. display: flex;
  46. align-items: center;
  47. justify-content: space-between;
  48. padding: 3px 0;
  49. }
  50. .question-card__item-left {
  51. width: calc(100% - 0rpx);
  52. font-size: 28rpx;
  53. color: #3D3D3D;
  54. // padding-right: 30rpx;
  55. white-space: nowrap;
  56. overflow: hidden;
  57. text-overflow: ellipsis;
  58. }
  59. .question-card__item-content {
  60. width: 100%;
  61. text-align: justify;
  62. /* white-space: nowrap;
  63. overflow: hidden;
  64. text-overflow: ellipsis; */
  65. }
  66. }
  67. </style>