message-consult.scss 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242
  1. @import "../../../../themes/t.cell.scss";
  2. @import "../../common.scss";
  3. .consult-wrapper {
  4. padding-bottom: 180rpx;
  5. &.consult-ended {
  6. padding-bottom: 0;
  7. }
  8. }
  9. .message-content {
  10. display: flex;
  11. justify-content: center;
  12. align-items: flex-start; // 改为 flex-start,避免影响内部元素
  13. // min-height: 72rpx;
  14. font-size: 28rpx;
  15. color: #333;
  16. // Markdown 内容样式
  17. .markdown-content {
  18. width: 100%;
  19. word-wrap: break-word;
  20. word-break: break-all;
  21. white-space: normal;
  22. line-height: 1.5;
  23. font-size: 28rpx;
  24. display: block; // 确保是块级元素
  25. // 加粗和斜体样式 - 现在使用 span 标签
  26. // span 标签默认就是行内元素,不需要额外设置
  27. span {
  28. display: inline !important;
  29. white-space: normal !important;
  30. line-height: inherit !important;
  31. margin: 0 !important;
  32. padding: 0 !important;
  33. vertical-align: baseline;
  34. float: none !important;
  35. clear: none !important;
  36. }
  37. // 代码块样式
  38. pre {
  39. background-color: #f5f5f5;
  40. padding: 16rpx;
  41. border-radius: 8rpx;
  42. overflow-x: auto;
  43. margin: 16rpx 0;
  44. }
  45. code {
  46. background-color: #f5f5f5;
  47. padding: 4rpx 8rpx;
  48. border-radius: 4rpx;
  49. font-family: 'Courier New', monospace;
  50. font-size: 24rpx;
  51. }
  52. pre code {
  53. background-color: transparent;
  54. padding: 0;
  55. }
  56. // 列表样式
  57. ul {
  58. margin: 16rpx 0;
  59. padding-left: 40rpx;
  60. }
  61. li {
  62. margin: 8rpx 0;
  63. list-style-type: disc;
  64. // 确保列表项内的加粗文字不会换行
  65. span {
  66. display: inline !important;
  67. }
  68. }
  69. // 换行处理
  70. br {
  71. line-height: 1.5;
  72. }
  73. }
  74. }
  75. .message-image {
  76. width: 200rpx;
  77. height: 200rpx;
  78. border-radius: 16rpx;
  79. display: block;
  80. }
  81. .input-panel {
  82. position: fixed;
  83. left: 0;
  84. right: 0;
  85. display: flex;
  86. flex-direction: column;
  87. align-items: stretch;
  88. padding: 16rpx 24rpx;
  89. box-sizing: border-box;
  90. z-index: 10;
  91. // 使用更平滑的过渡,避免位置变化时的跳动
  92. transition: bottom 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  93. will-change: bottom;
  94. }
  95. .chat-card {
  96. --avatar-size: 42px;
  97. .image-message,
  98. .text-message {
  99. max-width: calc(90% - var(--avatar-size)) !important;
  100. border-radius: 0px 10px 10px 10px !important;
  101. background-color: white;
  102. overflow: hidden;
  103. }
  104. &.right {
  105. .image-message,
  106. .text-message {
  107. border-radius: 10px 0px 10px 10px !important;
  108. }
  109. }
  110. }
  111. .action-bar {
  112. display: flex;
  113. justify-content: center;
  114. align-items: center;
  115. margin-bottom: 12rpx;
  116. gap: 24rpx;
  117. }
  118. .action-btn {
  119. display: inline-flex;
  120. align-items: center;
  121. padding: 0 24rpx;
  122. height:80rpx;
  123. line-height: 80rpx;
  124. border-radius: 12rpx;
  125. font-size: 30rpx;
  126. }
  127. .action-btn.secondary {
  128. color: black;
  129. }
  130. .action-btn.danger {
  131. color: #1d6ff6;
  132. }
  133. .action-text {
  134. margin-left: 8rpx;
  135. }
  136. .input-row {
  137. display: flex;
  138. align-items: flex-end;
  139. gap: 16rpx;
  140. }
  141. .text-input {
  142. flex: 1;
  143. width: 60% !important;
  144. min-height: 80rpx;
  145. max-height: 200rpx;
  146. padding: 12rpx 20rpx;
  147. background: #ffffff;
  148. border-radius: 12rpx;
  149. border: 1rpx solid #e6e6e6;
  150. color: #333333;
  151. font-size: 28rpx;
  152. line-height: 1.9;
  153. box-sizing: border-box;
  154. // 超过 max-height 后显示滚动条
  155. overflow-y: scroll !important;
  156. overflow-x: hidden;
  157. // 启用平滑滚动(iOS 和部分 Android 支持)
  158. -webkit-overflow-scrolling: touch;
  159. // 平滑过渡,让高度变化更自然(类似微信)
  160. // 使用适中的过渡时间和缓动函数,平衡响应速度和平滑度
  161. transition: height 0.2s ease-out;
  162. // 确保内容可以滚动和换行
  163. word-wrap: break-word;
  164. word-break: break-all;
  165. // 优化滚动行为,避免突然跳动
  166. scroll-behavior: smooth;
  167. }
  168. .send-btn {
  169. padding: 0 24rpx;
  170. height: 80rpx;
  171. line-height: 80rpx;
  172. background: #1d6ff6;
  173. color: #ffffff;
  174. border-radius: 12rpx;
  175. font-size: 28rpx;
  176. flex-shrink: 0;
  177. }
  178. .media-btn {
  179. display: inline-flex;
  180. flex-direction: column;
  181. align-items: center;
  182. justify-content: center;
  183. background: #ffffff;
  184. border-radius: 8rpx;
  185. padding: 0 20rpx;
  186. flex-shrink: 0;
  187. height:80rpx;
  188. margin: 0 5rpx;
  189. }
  190. .media-text {
  191. color: #1d6ff6;
  192. font-size: 24rpx;
  193. margin-top: 2rpx;
  194. }
  195. /* 系统消息样式 */
  196. .system-wrapper {
  197. display: flex;
  198. flex-direction: column;
  199. align-items: center;
  200. margin: 6px 0;
  201. .title {
  202. padding: 4px 12px;
  203. font-size: 12px;
  204. color: #999999;
  205. border-radius: 5px;
  206. }
  207. .date {
  208. font-size: 12px;
  209. color: #999;
  210. margin-bottom: 6px;
  211. }
  212. }
  213. .chat-box {
  214. padding: 15rpx 0 15rpx 30rpx !important;
  215. }