ExampleChat.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. <script setup lang="ts">
  2. import fireIcon from '@/assets/imgs/ai/fire.png'
  3. import refreshIcon from '@/assets/imgs/ai/refresh.png'
  4. interface ExampleChatProps {
  5. changeQuestion: (q: string, init?: boolean) => void
  6. }
  7. const props = defineProps<ExampleChatProps>()
  8. const { changeQuestion } = props
  9. const entries = [
  10. '村庄规划的编制要点是什么?',
  11. '耕地占补平衡方案写作案例?',
  12. '低效用地再开发方案编制要点?',
  13. '批而未供核查举证方式有哪些?',
  14. '批而未供核查举证方式有哪些?',
  15. '批而未供核查举证方式有哪些?',
  16. '浙江省工业用地调查技术导则?',
  17. '土地储备计划编制案例?'
  18. ]
  19. </script>
  20. <template>
  21. <div class="example-chat">
  22. <h3 class="title"> 你好,我是智能助理-小智 </h3>
  23. <p> 今天又是充满能量的一天!我可以为你提供24小时智能机器人咨询服务,有什么可以帮助你的么? </p>
  24. <p>
  25. 想知道如何进行提问?
  26. <a class="a-btn">点击查看</a>
  27. </p>
  28. <div class="entry-header">
  29. <span>大家都在问:</span>
  30. <a class="a-btn"> <img class="icon" :src="refreshIcon" alt="" />换一批</a>
  31. </div>
  32. <div class="example-entries">
  33. <div
  34. class="example-entry"
  35. v-for="entry in entries"
  36. :key="entry"
  37. @click="changeQuestion(entry)"
  38. >
  39. <img class="icon" :src="fireIcon" alt="" />
  40. <span>{{ entry }}</span>
  41. </div>
  42. </div>
  43. </div>
  44. </template>
  45. <style scoped lang="scss">
  46. .example-chat {
  47. font-size: 16px;
  48. color: #2d333c;
  49. p {
  50. margin: 10px 0;
  51. }
  52. .title {
  53. font-weight: bold;
  54. font-size: 20px;
  55. color: #27375f;
  56. margin-bottom: 20px;
  57. }
  58. .a-btn {
  59. cursor: pointer;
  60. display: inline-flex;
  61. align-items: center;
  62. color: #2e77e6;
  63. .icon {
  64. width: 16px;
  65. height: 16px;
  66. border-radius: 50%;
  67. margin-right: 8px;
  68. }
  69. }
  70. .entry-header {
  71. width: 100%;
  72. display: flex;
  73. justify-content: space-between;
  74. margin-top: 40px;
  75. font-size: 16px;
  76. }
  77. .example-entries {
  78. width: 100%;
  79. display: flex;
  80. flex-wrap: wrap;
  81. align-items: center;
  82. margin-top: 20px;
  83. grid-gap: 20px;
  84. .example-entry {
  85. width: calc(25% - 16px);
  86. padding: 12px 20px;
  87. border-radius: 8px;
  88. background-color: #e9f0fb;
  89. cursor: pointer;
  90. display: flex;
  91. align-items: center;
  92. span {
  93. overflow: hidden;
  94. text-overflow: ellipsis;
  95. white-space: nowrap;
  96. }
  97. .icon {
  98. width: 24px;
  99. height: 24px;
  100. border-radius: 50%;
  101. }
  102. &:hover {
  103. background-color: #f4f6f9;
  104. }
  105. }
  106. }
  107. }
  108. </style>