historyChat.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  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. flex-shrink: 0;
  42. .new-chat-btn {
  43. flex-shrink: 0;
  44. width: 100%;
  45. height: 46px;
  46. font-weight: 400;
  47. font-size: 18px;
  48. color: #ffffff;
  49. background-image: url('@/assets/imgs/ai/new_chat_bg.png');
  50. border-radius: 8px;
  51. display: flex;
  52. justify-content: center;
  53. align-items: center;
  54. cursor: pointer;
  55. .icon {
  56. width: 22px;
  57. height: 22px;
  58. margin-right: 10px;
  59. }
  60. &:hover {
  61. opacity: 0.9;
  62. }
  63. }
  64. .search-content {
  65. width: 100%;
  66. font-size: 16px;
  67. color: #8a94a4;
  68. margin-top: 20px;
  69. flex-shrink: 0;
  70. border-bottom: 1px solid #e9ecee;
  71. padding-bottom: 10px;
  72. :deep(.el-input__wrapper) {
  73. border: none !important;
  74. box-shadow: none !important;
  75. }
  76. }
  77. .histories-content {
  78. width: 100%;
  79. flex-grow: 1;
  80. overflow-y: auto;
  81. .history-body {
  82. width: 100%;
  83. margin-top: 12px;
  84. display: flex;
  85. align-items: center;
  86. padding: 12px 15px;
  87. background: #f4f6f9;
  88. border-radius: 8px 8px 8px 8px;
  89. font-size: 16px;
  90. color: #2d333c;
  91. cursor: pointer;
  92. .icon {
  93. width: 16px;
  94. height: 16px;
  95. margin-right: 8px;
  96. }
  97. &:hover {
  98. background-color: #e9f0fb;
  99. }
  100. }
  101. }
  102. .footer {
  103. position: absolute;
  104. bottom: 0;
  105. width: 100%;
  106. padding: 20px 0;
  107. display: flex;
  108. justify-content: space-between;
  109. .delete-btn {
  110. margin-left: 20px;
  111. font-size: 16px;
  112. color: #6e7c92;
  113. }
  114. }
  115. }
  116. </style>