historyChat.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. <script setup lang="ts">
  2. import newChatIcon from '@/assets/imgs/ai/new_chat_icon.png'
  3. import msgIcon from '@/assets/imgs/ai/msg-icon.png'
  4. const searchKey = ref('')
  5. const handleNewChat = (): void => {
  6. console.log('handleNewChat')
  7. }
  8. </script>
  9. <template>
  10. <div class="ai-history-chat">
  11. <div class="new-chat-btn" @click="handleNewChat">
  12. <img class="icon" :src="newChatIcon" alt="" />
  13. 新建对话
  14. </div>
  15. <div class="search-content">
  16. <el-input prefix-icon="Search" type="text" v-model="searchKey" placeholder="搜素历史记录" />
  17. </div>
  18. <div class="histories-content">
  19. <div class="history-body">
  20. <img class="icon" :src="msgIcon" alt="" />
  21. <span class="text">村庄规划的编制要点是什么?</span>
  22. </div>
  23. </div>
  24. <div class="footer">
  25. <!-- <div class="delete-btn">批量删除</div>-->
  26. </div>
  27. </div>
  28. </template>
  29. <style lang="scss" scoped>
  30. .ai-history-chat {
  31. position: relative;
  32. margin-right: 20px;
  33. height: 100%;
  34. width: 360px;
  35. background: #ffffff;
  36. border-radius: 20px 20px 20px 20px;
  37. padding: 25px 25px 50px;
  38. display: flex;
  39. flex-direction: column;
  40. align-items: center;
  41. .new-chat-btn {
  42. flex-shrink: 0;
  43. width: 100%;
  44. height: 46px;
  45. font-weight: 400;
  46. font-size: 18px;
  47. color: #ffffff;
  48. background-image: url('@/assets/imgs/ai/new_chat_bg.png');
  49. border-radius: 8px;
  50. display: flex;
  51. justify-content: center;
  52. align-items: center;
  53. cursor: pointer;
  54. .icon {
  55. width: 22px;
  56. height: 22px;
  57. margin-right: 10px;
  58. }
  59. }
  60. .search-content {
  61. width: 100%;
  62. font-size: 16px;
  63. color: #8a94a4;
  64. margin-top: 20px;
  65. flex-shrink: 0;
  66. border-bottom: 1px solid #e9ecee;
  67. padding-bottom: 10px;
  68. :deep(.el-input__wrapper) {
  69. border: none !important;
  70. box-shadow: none !important;
  71. }
  72. }
  73. .histories-content {
  74. width: 100%;
  75. flex-grow: 1;
  76. overflow-y: auto;
  77. .history-body {
  78. width: 100%;
  79. margin-top: 12px;
  80. display: flex;
  81. align-items: center;
  82. padding: 12px 15px;
  83. background: #f4f6f9;
  84. border-radius: 8px 8px 8px 8px;
  85. font-size: 16px;
  86. color: #2d333c;
  87. .icon {
  88. width: 16px;
  89. height: 16px;
  90. margin-right: 8px;
  91. }
  92. }
  93. }
  94. .footer {
  95. position: absolute;
  96. bottom: 0;
  97. width: 100%;
  98. padding: 20px 0;
  99. display: flex;
  100. justify-content: space-between;
  101. .delete-btn {
  102. margin-left: 20px;
  103. font-size: 16px;
  104. color: #6e7c92;
  105. }
  106. }
  107. }
  108. </style>