message-consult.scss 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289
  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 内容样式 - mp-html 组件样式
  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. // mp-html 生成的加粗标签样式 - 确保不会换行
  26. strong,
  27. b {
  28. display: inline !important;
  29. font-weight: bold !important;
  30. white-space: normal !important;
  31. margin: 0 !important;
  32. padding: 0 !important;
  33. line-height: inherit !important;
  34. vertical-align: baseline;
  35. }
  36. // 斜体样式
  37. em,
  38. i {
  39. display: inline !important;
  40. font-style: italic !important;
  41. white-space: normal !important;
  42. margin: 0 !important;
  43. padding: 0 !important;
  44. line-height: inherit !important;
  45. vertical-align: baseline;
  46. }
  47. // 代码块样式
  48. pre {
  49. background-color: #f5f5f5;
  50. padding: 16rpx;
  51. border-radius: 8rpx;
  52. overflow-x: auto;
  53. margin: 16rpx 0;
  54. display: block;
  55. }
  56. code {
  57. background-color: #f5f5f5;
  58. padding: 4rpx 8rpx;
  59. border-radius: 4rpx;
  60. font-family: 'Courier New', monospace;
  61. font-size: 24rpx;
  62. display: inline;
  63. }
  64. pre code {
  65. background-color: transparent;
  66. padding: 0;
  67. display: block;
  68. }
  69. // 列表样式
  70. ul,
  71. ol {
  72. margin: 16rpx 0;
  73. padding-left: 40rpx;
  74. display: block;
  75. }
  76. li {
  77. margin: 8rpx 0;
  78. list-style-type: disc;
  79. display: list-item;
  80. // 确保列表项内的加粗文字不会换行
  81. strong,
  82. b {
  83. display: inline !important;
  84. }
  85. }
  86. // 段落样式
  87. p {
  88. margin: 8rpx 0;
  89. display: block;
  90. line-height: 1.5;
  91. strong,
  92. b {
  93. display: inline !important;
  94. }
  95. // 确保段落内的加粗不会换行
  96. &:has(strong),
  97. &:has(b) {
  98. strong,
  99. b {
  100. display: inline !important;
  101. white-space: normal !important;
  102. }
  103. }
  104. }
  105. // 换行处理
  106. br {
  107. line-height: 1.5;
  108. }
  109. // 确保所有行内元素不会换行
  110. span {
  111. display: inline !important;
  112. white-space: normal !important;
  113. }
  114. }
  115. }
  116. .message-image {
  117. width: 200rpx;
  118. height: 200rpx;
  119. border-radius: 16rpx;
  120. display: block;
  121. }
  122. .input-panel {
  123. position: fixed;
  124. left: 0;
  125. right: 0;
  126. display: flex;
  127. flex-direction: column;
  128. align-items: stretch;
  129. padding: 16rpx 24rpx;
  130. box-sizing: border-box;
  131. z-index: 10;
  132. // 使用更平滑的过渡,避免位置变化时的跳动
  133. transition: bottom 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  134. will-change: bottom;
  135. }
  136. .chat-card {
  137. --avatar-size: 42px;
  138. .image-message,
  139. .text-message {
  140. max-width: calc(90% - var(--avatar-size)) !important;
  141. border-radius: 0px 10px 10px 10px !important;
  142. background-color: white;
  143. overflow: hidden;
  144. }
  145. &.right {
  146. .image-message,
  147. .text-message {
  148. border-radius: 10px 0px 10px 10px !important;
  149. }
  150. }
  151. }
  152. .action-bar {
  153. display: flex;
  154. justify-content: center;
  155. align-items: center;
  156. margin-bottom: 12rpx;
  157. gap: 24rpx;
  158. }
  159. .action-btn {
  160. display: inline-flex;
  161. align-items: center;
  162. padding: 0 24rpx;
  163. height:80rpx;
  164. line-height: 80rpx;
  165. border-radius: 12rpx;
  166. font-size: 30rpx;
  167. }
  168. .action-btn.secondary {
  169. color: black;
  170. }
  171. .action-btn.danger {
  172. color: #1d6ff6;
  173. }
  174. .action-text {
  175. margin-left: 8rpx;
  176. }
  177. .input-row {
  178. display: flex;
  179. align-items: flex-end;
  180. gap: 16rpx;
  181. }
  182. .text-input {
  183. flex: 1;
  184. width: 60% !important;
  185. min-height: 80rpx;
  186. max-height: 200rpx;
  187. padding: 12rpx 20rpx;
  188. background: #ffffff;
  189. border-radius: 12rpx;
  190. border: 1rpx solid #e6e6e6;
  191. color: #333333;
  192. font-size: 28rpx;
  193. line-height: 1.9;
  194. box-sizing: border-box;
  195. // 超过 max-height 后显示滚动条
  196. overflow-y: scroll !important;
  197. overflow-x: hidden;
  198. // 启用平滑滚动(iOS 和部分 Android 支持)
  199. -webkit-overflow-scrolling: touch;
  200. // 平滑过渡,让高度变化更自然(类似微信)
  201. // 使用适中的过渡时间和缓动函数,平衡响应速度和平滑度
  202. transition: height 0.2s ease-out;
  203. // 确保内容可以滚动和换行
  204. word-wrap: break-word;
  205. word-break: break-all;
  206. // 优化滚动行为,避免突然跳动
  207. scroll-behavior: smooth;
  208. }
  209. .send-btn {
  210. padding: 0 24rpx;
  211. height: 80rpx;
  212. line-height: 80rpx;
  213. background: #1d6ff6;
  214. color: #ffffff;
  215. border-radius: 12rpx;
  216. font-size: 28rpx;
  217. flex-shrink: 0;
  218. }
  219. .media-btn {
  220. display: inline-flex;
  221. flex-direction: column;
  222. align-items: center;
  223. justify-content: center;
  224. background: #ffffff;
  225. border-radius: 8rpx;
  226. padding: 0 20rpx;
  227. flex-shrink: 0;
  228. height:80rpx;
  229. margin: 0 5rpx;
  230. }
  231. .media-text {
  232. color: #1d6ff6;
  233. font-size: 24rpx;
  234. margin-top: 2rpx;
  235. }
  236. /* 系统消息样式 */
  237. .system-wrapper {
  238. display: flex;
  239. flex-direction: column;
  240. align-items: center;
  241. margin: 6px 0;
  242. .title {
  243. padding: 4px 12px;
  244. font-size: 12px;
  245. color: #999999;
  246. border-radius: 5px;
  247. }
  248. .date {
  249. font-size: 12px;
  250. color: #999;
  251. margin-bottom: 6px;
  252. }
  253. }
  254. .chat-box {
  255. padding: 15rpx 0 15rpx 30rpx !important;
  256. }