ChatBox.css 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487
  1. .chat-container {
  2. position: relative;
  3. display: flex;
  4. flex-direction: column;
  5. margin: 10px 20px 0;
  6. margin-bottom: 150px;
  7. /* 或者按照实际需要调整高度 */
  8. }
  9. .chat-container .header{
  10. width: 90%;
  11. margin: 10px auto 0;
  12. border: 1px solid #d7d7d7;
  13. border-radius: 10px;
  14. }
  15. .form-container {
  16. max-width: 1200px; /* 或者其他适合你布局的宽度 */
  17. margin: 0 auto; /* 这会使容器水平居中 */
  18. padding: 0 15px; /* 添加一些左右内边距 */
  19. }
  20. .el-form-item {
  21. margin-bottom: 15px;
  22. }
  23. .el-select {
  24. width: 100%;
  25. }
  26. .generate-button {
  27. margin-top: 10px; /* 在小屏幕上给按钮一些上边距 */
  28. margin-right: 25px;
  29. }
  30. @media (max-width: 768px) {
  31. .selection-summary {
  32. flex-direction: column;
  33. }
  34. .generate-button {
  35. margin-left: 0;
  36. margin-top: 15px;
  37. align-self: flex-end; /* 在小屏幕上将按钮右对齐 */
  38. }
  39. }
  40. .selection-summary {
  41. background-color: #f2f2f2;
  42. border-radius: 4px;
  43. padding: 15px;
  44. margin: 15px;
  45. display: flex;
  46. justify-content: space-between;
  47. align-items: center;
  48. border-radius:10px;
  49. }
  50. .summary-content {
  51. flex-grow: 1;
  52. }
  53. .summary-label {
  54. font-weight: bold;
  55. color: #7f7f7f;
  56. margin-right: 10px;
  57. }
  58. .summary-text {
  59. color: #606266;
  60. margin: 0;
  61. margin-top: 3px;
  62. font-size: 14px;
  63. }
  64. .title{
  65. width: 90%;
  66. /* margin: 0 auto 15px; */
  67. display: flex;
  68. align-items: center;
  69. }
  70. .title_info{
  71. cursor: pointer;
  72. color: #1296db;
  73. font-size: 14px;
  74. margin-left: 10px;
  75. }
  76. /* .chat-container .header ::v-deep .el-select .el-input--medium .el-input__inner{
  77. border: none;
  78. }
  79. .chat-container .header ::v-deep .el-select .el-input--medium .el-input__suffix .el-input__suffix-inner{
  80. display: none;
  81. } */
  82. .chat-container .content {
  83. display: flex;
  84. justify-content: flex-start;
  85. }
  86. .chat-container .content .left{
  87. margin-left: 10px;
  88. width: 330px;
  89. height: 87vh;
  90. }
  91. .chat-item {
  92. border-radius: 10px;
  93. padding: 10px;
  94. border-bottom: 1px solid #e8edf2;
  95. background-color: #f5f5fa;
  96. margin-bottom: 10px;
  97. }
  98. .chat-header {
  99. display: flex;
  100. align-items: center;
  101. margin-bottom: 5px;
  102. }
  103. .avatar {
  104. width: 40px;
  105. height: 40px;
  106. border-radius: 50%;
  107. margin-right: 10px;
  108. }
  109. .user-info {
  110. flex-grow: 1;
  111. }
  112. .user-info .info_header{
  113. display: flex;
  114. align-items: flex-end;
  115. }
  116. .username {
  117. font-weight: bold;
  118. }
  119. .timestamp {
  120. margin-left:13px;
  121. font-size: 0.8em;
  122. color: #888;
  123. }
  124. .more-options {
  125. cursor: pointer;
  126. }
  127. .chat-message {
  128. font-weight: bold;
  129. margin-top: 8px;
  130. margin-bottom: 10px;
  131. }
  132. .chat-preview {
  133. font-size: 0.9em;
  134. color: #666;
  135. }
  136. /* Adjust existing styles */
  137. .left {
  138. width: 300px; /* Increased width to accommodate the new layout */
  139. }
  140. .chat-history {
  141. width: 330px;
  142. height: 100%;
  143. overflow-y: auto;
  144. }
  145. .messages {
  146. width: 1180px; /* 设置消息列表宽度为屏幕宽度的 80% */
  147. max-width: 90%; /* 限制最大宽度,避免超出视口 */
  148. margin: 0 auto; /* 上下保持原有的 margin,左右自动调整以居中 */
  149. overflow-y: auto; /* 如果消息太多,允许滚动 */
  150. height: calc(100vh - 230px); /* 高度需要根据输入框和其他元素的高度调整 */
  151. padding: 10px; /* 或你希望的内边距大小 */
  152. margin-bottom: 120px;
  153. }
  154. /* 针对手机端的媒体查询 */
  155. @media screen and (max-width: 768px) {
  156. .messages {
  157. width: 100%;
  158. max-width: 100%;
  159. margin: 0;
  160. margin-bottom: 120px;
  161. }
  162. }
  163. .user-message {
  164. display: flex;
  165. flex-direction: column !important;
  166. align-items: flex-end !important;
  167. }
  168. .user-message .message-content {
  169. order: 1;
  170. text-align: right;
  171. }
  172. .user-message .avatar {
  173. order: 2;
  174. margin-left: 10px;
  175. margin-right: 0;
  176. }
  177. .message-text {
  178. margin-top: 5px;
  179. }
  180. .messages li {
  181. display: flex;
  182. flex-direction: column;
  183. align-items: flex-start; /* 这将确保所有子元素对齐到容器的顶部 */
  184. /* margin-bottom: 10px; */
  185. }
  186. .avatar {
  187. width: 40px; /* 头像的尺寸 */
  188. height: 40px;
  189. border-radius: 50%; /* 圆形头像 */
  190. /*background-color: #e9e0e0; 暂时用灰色代替,你可以用图片替换 */
  191. align-self: start; /* 这将覆盖 flex 容器的 align-items 并将头像对齐到顶部 */
  192. margin-right: 10px; /* 按需调整以在头像和消息之间提供空间 */
  193. }
  194. .user-avatar {
  195. background-image: url('../assets/用户.png') ;
  196. background-position: center;
  197. background-repeat: no-repeat;
  198. background-size: cover;
  199. /* background-color: #93939d; */ /* 用户头像颜色 */
  200. }
  201. .bot-avatar {
  202. background-image: url('../assets/机器人.png');
  203. background-position: center;
  204. background-repeat: no-repeat;
  205. background-size: cover;
  206. /* background-color: green; */ /* AI头像颜色 */
  207. }
  208. /* 针对手机端的媒体查询 */
  209. @media screen and (max-width: 768px) {
  210. .user-avatar, .bot-avatar {
  211. width: 30px; /* 或其他更小的尺寸 */
  212. height: 30px;
  213. }
  214. }
  215. .message_name{
  216. display: flex;
  217. align-items: center;
  218. padding-top: 5px;
  219. padding-bottom: 5px;
  220. }
  221. .name{
  222. margin-left: 8px;
  223. /* margin-bottom: 5px; */
  224. }
  225. .message-content {
  226. background-color: #f0f0f0; /* 消息背景 */
  227. padding-left: 20px; /* 上下左右的内边距 */
  228. padding-right: 20px; /* 上下左右的内边距 */
  229. padding-top: 10px; /* 上下左右的内边距 */
  230. padding-bottom: 0px; /* 上下左右的内边距 */
  231. max-width: calc(90% - 10px); /* 计算头像和间距 */
  232. border-radius: 7px; /* 边框圆角 */
  233. /* margin-bottom: 10px; 和下一条消息之间的间距 */
  234. /* 消息内容样式 */
  235. display: flex;
  236. flex-direction: column; /* 排列文本 */
  237. margin-top: 0;
  238. }
  239. .message-text {
  240. margin: 0;
  241. white-space: normal; /* 确保文本会换行 */
  242. word-wrap: break-word; /* 长单词或 URL 会被断开以适应容器宽度 */
  243. overflow: auto;
  244. }
  245. .message-text ::v-deep p {
  246. font-size: 14px !important;
  247. margin: 5px 0 10px;
  248. padding: 0;
  249. font-size: inherit;
  250. line-height: 22px;
  251. font-weight: inherit;
  252. }
  253. .message-text ::v-deep ol{
  254. padding-bottom: 10px ;
  255. }
  256. .message-text ::v-deep .source-section h3 {
  257. margin: 20px 0 3px;
  258. color: #333;
  259. font-size: 1.1em;
  260. }
  261. .message-text ::v-deep ol li{
  262. padding-top:3px ;
  263. }
  264. .message-text ::v-deep ol li a{
  265. color: #1296db;
  266. }
  267. .input-container {
  268. position: absolute; /* 改为绝对定位 */
  269. bottom: 10px; /* 距离底部的距离 */
  270. left: 50%;
  271. transform: translateX(-50%);
  272. width: 90%; /* 设置宽度为弹窗宽度的90% */
  273. max-width: 800px; /* 设置最大宽度 */
  274. display: flex;
  275. justify-content: space-between;
  276. align-items: center;
  277. padding: 10px;
  278. background: white;
  279. border-radius: 10px;
  280. box-shadow: 0px 2px 5px rgba(0,0,0,0.1);
  281. }
  282. textarea {
  283. font-size: 16px;
  284. width: 100%; /* 可以根据需要调整 */
  285. padding: 10px;
  286. border: 1px solid #ccc;
  287. border-radius: 4px;
  288. border: none;
  289. outline: none;
  290. resize: none;
  291. }
  292. .input-container textarea {
  293. width: 100%; /* 输入框占据所有可用空间 */
  294. padding: 10px;
  295. margin-right: 10px; /* 与按钮的间隔 */
  296. box-sizing: border-box;
  297. }
  298. .input-container button {
  299. min-width: 80px; /* 例如,按钮的最小宽度为 100px */
  300. white-space: nowrap; /* 防止文字折行 */
  301. padding: 10px 20px;
  302. cursor: pointer;
  303. }
  304. .sender-name {
  305. font-weight: bold;
  306. color: #333;
  307. margin-left: -5px;
  308. }
  309. .btn {
  310. font-size: 16px;
  311. color: #ffffff;
  312. border-radius: 5px;
  313. border: none;
  314. background-color: #3cbade;
  315. padding: 10px 20px; /* 添加内边距 */
  316. width: auto; /* 让宽度自适应内容 */
  317. }
  318. /* 针对手机端的媒体查询 */
  319. @media screen and (max-width: 768px) {
  320. .btn {
  321. font-size: 14px; /* 稍微减小字体大小 */
  322. padding: 8px 16px; /* 减小内边距 */
  323. max-width: 80px; /* 限制最大宽度 */
  324. margin: 0 auto; /* 居中显示 */
  325. }
  326. }
  327. .content_card{
  328. width: 98%;
  329. margin: 0 20px;
  330. }
  331. /* 应用卡片 */
  332. .card-container {
  333. display: flex;
  334. flex-wrap: wrap;
  335. gap: 20px;
  336. }
  337. .card {
  338. width: calc(20% - 16px);
  339. background-color: #fff;
  340. height: 300px;
  341. border-radius: 8px;
  342. box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
  343. padding: 20px;
  344. }
  345. .card-header {
  346. display: flex;
  347. justify-content: space-between;
  348. align-items: center;
  349. margin-bottom: 10px;
  350. }
  351. .card-header h2 {
  352. margin: 0;
  353. font-size: 22px;
  354. margin-bottom: 5px;
  355. }
  356. .card-description {
  357. color: #000;
  358. font-size: 18px;
  359. font-weight: 600;
  360. margin-bottom: 15px;
  361. }
  362. .file-types {
  363. margin-top: 10px;
  364. display: flex;
  365. gap: 15px;
  366. margin-bottom: 15px;
  367. }
  368. .file-type {
  369. display: flex;
  370. align-items: center;
  371. gap: 5px;
  372. }
  373. .file-type i {
  374. font-size: 20px;
  375. }
  376. .card_info{
  377. width: 100%;
  378. height: 60px;
  379. font-size: 14px;
  380. overflow:hidden;
  381. text-overflow: ellipsis;
  382. -webkit-line-clamp: 3;
  383. display: -webkit-box;
  384. -webkit-box-orient: vertical;
  385. }
  386. .card-footer {
  387. margin-top: 20px;
  388. font-size: 12px;
  389. display: flex;
  390. justify-content: space-between;
  391. align-items: center;
  392. }
  393. .footer_left{
  394. }
  395. .footer_right{
  396. color: #1296db;
  397. }
  398. ::v-deep .el-collapse{
  399. border: none;
  400. }
  401. ::v-deep .el-collapse-item__wrap{
  402. border-bottom: none;
  403. }
  404. .header_btn{
  405. display: flex;
  406. justify-content: flex-end;
  407. }
  408. ::v-deep .el-form--inline .el-form-item{
  409. display: block;
  410. }
  411. .truncate-text {
  412. max-width: calc(100% - 30px); /* 调整这个值以适应下拉菜单的宽度 */
  413. white-space: nowrap;
  414. overflow: hidden;
  415. text-overflow: ellipsis;
  416. }
  417. /* Add this to your existing styles */
  418. .knowledge-base-name {
  419. display: inline-block;
  420. max-width: 100px; /* Adjust this value as needed */
  421. white-space: nowrap;
  422. overflow: hidden;
  423. text-overflow: ellipsis;
  424. margin-right: 5px; /* Add some spacing between spans */
  425. }