| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289 |
- @import "../../../../themes/t.cell.scss";
- @import "../../common.scss";
- .consult-wrapper {
- padding-bottom: 180rpx;
- &.consult-ended {
- padding-bottom: 0;
- }
- }
- .message-content {
- display: flex;
- justify-content: center;
- align-items: flex-start; // 改为 flex-start,避免影响内部元素
- // min-height: 72rpx;
- font-size: 28rpx;
- color: #333;
-
- // Markdown 内容样式 - mp-html 组件样式
- .markdown-content {
- width: 100%;
- word-wrap: break-word;
- word-break: break-all;
- white-space: normal;
- line-height: 1.5;
- font-size: 28rpx;
- display: block;
-
- // mp-html 生成的加粗标签样式 - 确保不会换行
- strong,
- b {
- display: inline !important;
- font-weight: bold !important;
- white-space: normal !important;
- margin: 0 !important;
- padding: 0 !important;
- line-height: inherit !important;
- vertical-align: baseline;
- }
-
- // 斜体样式
- em,
- i {
- display: inline !important;
- font-style: italic !important;
- white-space: normal !important;
- margin: 0 !important;
- padding: 0 !important;
- line-height: inherit !important;
- vertical-align: baseline;
- }
-
- // 代码块样式
- pre {
- background-color: #f5f5f5;
- padding: 16rpx;
- border-radius: 8rpx;
- overflow-x: auto;
- margin: 16rpx 0;
- display: block;
- }
-
- code {
- background-color: #f5f5f5;
- padding: 4rpx 8rpx;
- border-radius: 4rpx;
- font-family: 'Courier New', monospace;
- font-size: 24rpx;
- display: inline;
- }
-
- pre code {
- background-color: transparent;
- padding: 0;
- display: block;
- }
-
- // 列表样式
- ul,
- ol {
- margin: 16rpx 0;
- padding-left: 40rpx;
- display: block;
- }
-
- li {
- margin: 8rpx 0;
- list-style-type: disc;
- display: list-item;
-
- // 确保列表项内的加粗文字不会换行
- strong,
- b {
- display: inline !important;
- }
- }
-
- // 段落样式
- p {
- margin: 8rpx 0;
- display: block;
- line-height: 1.5;
-
- strong,
- b {
- display: inline !important;
- }
-
- // 确保段落内的加粗不会换行
- &:has(strong),
- &:has(b) {
- strong,
- b {
- display: inline !important;
- white-space: normal !important;
- }
- }
- }
-
- // 换行处理
- br {
- line-height: 1.5;
- }
-
- // 确保所有行内元素不会换行
- span {
- display: inline !important;
- white-space: normal !important;
- }
- }
- }
- .message-image {
- width: 200rpx;
- height: 200rpx;
- border-radius: 16rpx;
- display: block;
- }
- .input-panel {
- position: fixed;
- left: 0;
- right: 0;
- display: flex;
- flex-direction: column;
- align-items: stretch;
- padding: 16rpx 24rpx;
- box-sizing: border-box;
- z-index: 10;
- // 使用更平滑的过渡,避免位置变化时的跳动
- transition: bottom 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
- will-change: bottom;
- }
- .chat-card {
- --avatar-size: 42px;
-
- .image-message,
- .text-message {
- max-width: calc(90% - var(--avatar-size)) !important;
- border-radius: 0px 10px 10px 10px !important;
- background-color: white;
- overflow: hidden;
- }
-
- &.right {
- .image-message,
- .text-message {
- border-radius: 10px 0px 10px 10px !important;
- }
- }
- }
- .action-bar {
- display: flex;
- justify-content: center;
- align-items: center;
- margin-bottom: 12rpx;
- gap: 24rpx;
- }
- .action-btn {
- display: inline-flex;
- align-items: center;
- padding: 0 24rpx;
- height:80rpx;
- line-height: 80rpx;
- border-radius: 12rpx;
- font-size: 30rpx;
- }
- .action-btn.secondary {
- color: black;
- }
- .action-btn.danger {
- color: #1d6ff6;
- }
- .action-text {
- margin-left: 8rpx;
- }
- .input-row {
- display: flex;
- align-items: flex-end;
- gap: 16rpx;
- }
- .text-input {
- flex: 1;
- width: 60% !important;
- min-height: 80rpx;
- max-height: 200rpx;
- padding: 12rpx 20rpx;
- background: #ffffff;
- border-radius: 12rpx;
- border: 1rpx solid #e6e6e6;
- color: #333333;
- font-size: 28rpx;
- line-height: 1.9;
- box-sizing: border-box;
- // 超过 max-height 后显示滚动条
- overflow-y: scroll !important;
- overflow-x: hidden;
- // 启用平滑滚动(iOS 和部分 Android 支持)
- -webkit-overflow-scrolling: touch;
- // 平滑过渡,让高度变化更自然(类似微信)
- // 使用适中的过渡时间和缓动函数,平衡响应速度和平滑度
- transition: height 0.2s ease-out;
- // 确保内容可以滚动和换行
- word-wrap: break-word;
- word-break: break-all;
- // 优化滚动行为,避免突然跳动
- scroll-behavior: smooth;
- }
- .send-btn {
- padding: 0 24rpx;
- height: 80rpx;
- line-height: 80rpx;
- background: #1d6ff6;
- color: #ffffff;
- border-radius: 12rpx;
- font-size: 28rpx;
- flex-shrink: 0;
- }
- .media-btn {
- display: inline-flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- background: #ffffff;
- border-radius: 8rpx;
- padding: 0 20rpx;
- flex-shrink: 0;
- height:80rpx;
- margin: 0 5rpx;
- }
- .media-text {
- color: #1d6ff6;
- font-size: 24rpx;
- margin-top: 2rpx;
- }
- /* 系统消息样式 */
- .system-wrapper {
- display: flex;
- flex-direction: column;
- align-items: center;
- margin: 6px 0;
- .title {
- padding: 4px 12px;
- font-size: 12px;
- color: #999999;
- border-radius: 5px;
- }
- .date {
- font-size: 12px;
- color: #999;
- margin-bottom: 6px;
- }
- }
- .chat-box {
- padding: 15rpx 0 15rpx 30rpx !important;
- }
|