From f555b8a9463be553dcd8682a228f885bac7b8cac Mon Sep 17 00:00:00 2001 From: jing <1683105490@qq.com> Date: Wed, 30 Sep 2026 10:49:08 +0800 Subject: [PATCH] =?UTF-8?q?chore=EF=BC=9A=E6=99=BA=E8=83=BD=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E5=92=8C=E5=9B=9E=E7=AD=94=E9=83=BD=E5=AD=97=E5=8F=B7?= =?UTF-8?q?=E9=83=BD25=EF=BC=8C=E4=B8=8D=E5=8A=A0=E7=B2=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages_tool/ai-chat/ai-chat-message.vue | 33 +++++++++++++++++++++----- 1 file changed, 27 insertions(+), 6 deletions(-) diff --git a/pages_tool/ai-chat/ai-chat-message.vue b/pages_tool/ai-chat/ai-chat-message.vue index 83617c7..2b8bf17 100644 --- a/pages_tool/ai-chat/ai-chat-message.vue +++ b/pages_tool/ai-chat/ai-chat-message.vue @@ -2967,7 +2967,7 @@ _handleStreamError(msg) { // 之前行内代码是粉色(#d63384)、删除线是灰色(#999), 回答里颜色太杂。 t = t .replace(/`([^`]+)`/g, '$1') - .replace(/\*\*(.+?)\*\*/g, '$1') + .replace(/\*\*(.+?)\*\*/g, '$1') .replace(/\*(.+?)\*/g, '$1') .replace(/~~(.+?)~~/g, '$1') @@ -3018,7 +3018,7 @@ _handleStreamError(msg) { const flushTable = () => { if (!inTable || tableRows.length === 0) return const thead = tableRows[0].map(c => - `${parseInline(c)}` + `${parseInline(c)}` ).join('') const tbody = tableRows.slice(1).map(row => '' + row.map(c => @@ -3066,7 +3066,7 @@ _handleStreamError(msg) { flushBuf(); out.push(closeList()) const lv = hMatch[1].length const size = ['', '36rpx', '32rpx', '30rpx', '28rpx', '26rpx', '24rpx'][lv] - const wgt = ['', '700', '700', '600', '600', '500', '500'][lv] + const wgt = ['', '400', '400', '400', '400', '400', '400'][lv] const mg = COMPACT ? ['', '14rpx 0 7rpx', '12rpx 0 6rpx', '10rpx 0 5rpx', '8rpx 0 5rpx', '7rpx 0 3rpx', '6rpx 0 3rpx'][lv] : ['', '20rpx 0 10rpx', '16rpx 0 8rpx', '14rpx 0 6rpx', '12rpx 0 6rpx', '10rpx 0 4rpx', '8rpx 0 4rpx'][lv] out.push(`${parseInline(hMatch[2])}`) continue @@ -4869,7 +4869,7 @@ _handleStreamError(msg) { color: #1a1a1a; strong { - font-weight: 600; + font-weight: 400; color: #1a1a1a; } @@ -5436,7 +5436,7 @@ _handleStreamError(msg) { max-width: 100%; .message-text { - font-size: 20rpx !important; // 还原为用户消息原字号 + font-size: 25rpx !important; // 还原为用户消息原字号 } &::before { @@ -5520,10 +5520,17 @@ _handleStreamError(msg) { } } + // AI 回答文字字号统一为 25rpx + .message-text, + .ai-message-text { + font-size: 25rpx !important; + line-height: 1.7; + } + // 微信端 AI 富文本(豆包风格)容器: 行高/字号/字色统一兜底 .ai-message-rich { display: block; - font-size: 30rpx; + font-size: 25rpx; line-height: 1.75; color: #1a1a1a; letter-spacing: 0.2rpx; @@ -6567,6 +6574,20 @@ _handleStreamError(msg) { line-height: 1.7; letter-spacing: 0.8rpx; } + + // AI 回答不加粗(兜底),同时统一 H5 markdown 容器字号为 25rpx + .ai-message { + .message-bubble, + .selectable-md { + strong, b, h1, h2, h3, h4, h5, h6, th { + font-weight: normal !important; + } + } + + .selectable-md { + font-size: 25rpx !important; + } + } } /* ========== AI 回答: 无气泡 ==========