ChatWelcome.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. <script setup>
  2. defineProps({
  3. title: {
  4. type: String,
  5. default: ""
  6. },
  7. cardTitle: {
  8. type: String,
  9. default: ""
  10. },
  11. subTitle: {
  12. type: Array,
  13. default: () => []
  14. },
  15. cardContent: {
  16. type: Array,
  17. default: () => []
  18. }
  19. })
  20. </script>
  21. <template>
  22. <view class="chat-welcome">
  23. <view class="weclome-inner">
  24. <TheSvgIcon src="icon-logo" size="136"></TheSvgIcon>
  25. <Text class="title">{{ title }}</Text>
  26. <Text class="desc" v-for="item, index in subTitle" :key="index">{{ item }}</Text>
  27. </view>
  28. <view class="recommend-inner">
  29. <view class="question-card">
  30. <text class="title">{{ cardTitle }}</text>
  31. <view class="list">
  32. <view class="item" v-for="item in cardContent" :key="item.id">
  33. <text class="text">{{ item.question }}</text>
  34. <TheSvgIcon src="icon-right-arrow" size="28"></TheSvgIcon>
  35. </view>
  36. </view>
  37. </view>
  38. </view>
  39. </view>
  40. </template>
  41. <style lang="scss" scoped>
  42. .chat-welcome {
  43. .weclome-inner {
  44. display: flex;
  45. align-items: center;
  46. flex-flow: column;
  47. padding: 0rpx 0 72rpx 0;
  48. text-align: center;
  49. .title {
  50. margin: 16rpx 0;
  51. background: linear-gradient(90deg, #5C6883 0%, #212121 100%);
  52. background-clip: text;
  53. font-weight: bold;
  54. font-size: 36rpx;
  55. -webkit-background-clip: text;
  56. -webkit-text-fill-color: transparent;
  57. }
  58. .desc {
  59. font-size: 24rpx;
  60. line-height: 44rpx;
  61. color: #7B909C;
  62. }
  63. }
  64. .recommend-inner {
  65. padding: 0 64rpx 0 22rpx;
  66. .question-card {
  67. padding: 40rpx 34rpx 20rpx 34rpx;
  68. border-radius: 4rpx 30rpx 30rpx 30rpx;
  69. background: #fff;
  70. font-size: 28rpx;
  71. font-weight: bold;
  72. .title {
  73. background: var(--, linear-gradient(92deg, #5ABBF2 12.24%, #2454FF 63.2%));
  74. background-clip: text;
  75. -webkit-background-clip: text;
  76. -webkit-text-fill-color: transparent;
  77. }
  78. .list {
  79. color: #212121;
  80. .item {
  81. display: flex;
  82. justify-content: space-between;
  83. align-items: center;
  84. padding: 32rpx 0;
  85. .text {
  86. padding-right: 60rpx;
  87. line-height: 48rpx;
  88. overflow: hidden;
  89. text-overflow: ellipsis;
  90. display: -webkit-box;
  91. -webkit-line-clamp: 2;
  92. -webkit-box-orient: vertical;
  93. }
  94. &:not(:last-child) {
  95. border-bottom: 1px solid #F6F6F6;
  96. }
  97. }
  98. }
  99. }
  100. }
  101. }
  102. </style>