chat.wxss 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. @charset "UTF-8";
  2. /**
  3. * 这里是uni-app内置的常用样式变量
  4. *
  5. * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
  6. * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
  7. *
  8. */
  9. /**
  10. * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
  11. *
  12. * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
  13. */
  14. /* 颜色变量 */
  15. /* 行为相关颜色 */
  16. page {
  17. pading: 0;
  18. height: 100%;
  19. }
  20. .chat {
  21. height: 100%;
  22. }
  23. .chat .goods {
  24. display: flex;
  25. position: fixed;
  26. width: 600rpx;
  27. right: 20rpx;
  28. bottom: calc(120rpx + env(safe-area-inset-bottom));
  29. border-radius: 14rpx;
  30. background: #fff;
  31. padding: 20rpx;
  32. }
  33. .chat .goods .close {
  34. position: absolute;
  35. left: -20rpx;
  36. top: -20rpx;
  37. }
  38. .chat .goods .send-btn {
  39. padding: 8rpx 22rpx;
  40. }
  41. .chat .content {
  42. transition: all 0.3s;
  43. flex: 1;
  44. min-height: 0;
  45. }
  46. .chat .content .loading {
  47. padding: 20rpx;
  48. height: 40px;
  49. }
  50. .chat .content .chat-lists {
  51. padding: 0 20rpx 30rpx;
  52. overflow: hidden;
  53. position: relative;
  54. }
  55. .chat .content .chat-lists .chat-tips {
  56. padding: 4rpx 20rpx;
  57. border-radius: 21rpx;
  58. display: inline-block;
  59. text-align: center;
  60. background-color: rgba(0, 0, 0, 0.2);
  61. }
  62. .chat .content .chat-lists .chat-item {
  63. padding-top: 30rpx;
  64. }
  65. .chat .content .chat-lists .chat-item.visibility {
  66. visibility: hidden;
  67. }
  68. .chat .content .chat-lists .chat-item .chat-info {
  69. display: flex;
  70. align-items: flex-start;
  71. }
  72. .chat .content .chat-lists .chat-item.right .chat-info {
  73. flex-direction: row-reverse;
  74. }
  75. .chat .content .chat-lists .chat-item.right .chat-info .text-box {
  76. background-color: #ed5349;
  77. color: #fff;
  78. }
  79. .chat .content .chat-lists .chat-item .avatar {
  80. width: 78rpx;
  81. height: 78rpx;
  82. border-radius: 14rpx;
  83. flex: none;
  84. }
  85. .chat .content .chat-lists .chat-item .text-box {
  86. max-width: 500rpx;
  87. min-width: 80rpx;
  88. background-color: #fff;
  89. border-radius: 14rpx;
  90. padding: 16rpx 20rpx;
  91. margin: 0 20rpx;
  92. word-break: break-word;
  93. line-height: 40rpx;
  94. }
  95. .chat .content .chat-lists .chat-item .image-box {
  96. max-width: 300rpx;
  97. margin: 0 20rpx;
  98. }
  99. .chat .content .chat-lists .chat-item .image-box .image {
  100. max-width: 100%;
  101. }
  102. .chat .content .chat-lists .chat-item .goods-box {
  103. position: static;
  104. width: 510rpx;
  105. }
  106. .chat .error {
  107. padding: 0 30rpx 30rpx;
  108. }
  109. .chat .error .error-msg {
  110. color: #bbb;
  111. word-break: break-word;
  112. }
  113. .chat .footer {
  114. background: #f2f2f2;
  115. padding-bottom: env(safe-area-inset-bottom);
  116. }
  117. .chat .footer .footer-input {
  118. height: 100rpx;
  119. padding: 0 20rpx;
  120. }
  121. .chat .footer .footer-input .icon {
  122. width: 52rpx;
  123. height: 52rpx;
  124. }
  125. .chat .footer .footer-input .input-contain {
  126. margin: 0 20rpx;
  127. background-color: #fff;
  128. height: 68rpx;
  129. border-radius: 60rpx;
  130. flex: 1;
  131. overflow: hidden;
  132. padding: 0 10rpx 0 30rpx;
  133. }
  134. .chat .footer .footer-input .input-contain .text-area {
  135. flex: 1;
  136. height: 100rpx;
  137. word-break: break-all;
  138. }
  139. .chat .emoji-wrap {
  140. height: 0;
  141. transition: all 0.3s;
  142. }
  143. .chat .emoji-wrap.emoji-show {
  144. height: 200px;
  145. }
  146. .chat .send-btn {
  147. padding: 0 25rpx;
  148. color: #fff;
  149. background-color: #ed5349;
  150. border-radius: 60rpx;
  151. }