fix: chat message vertical layout + expand only assistant; font 5 levels (最小/小/中/大/特大)

This commit is contained in:
2026-09-01 22:48:03 +08:00
parent 7e78d8d142
commit 880bd4011f
+9 -5
View File
@@ -26,8 +26,8 @@
</div>
<text class="think-text fl{{fontLevel}}" if="{{$item.showThink}}">{{$item.think}}</text>
<text class="chat-text fl{{fontLevel}}">{{$item.collapsed ? $item.preview : $item.text}}</text>
<text class="expand-chip" if="{{$item.collapsed}}">展开 ▾</text>
<text class="expand-chip" if="{{!$item.collapsed}}">收起 ▴</text>
<text class="expand-chip" if="{{$item.role === 'assistant' && $item.collapsed}}">展开 ▾</text>
<text class="expand-chip" if="{{$item.role === 'assistant' && !$item.collapsed}}">收起 ▴</text>
<image class="chat-img" src="/common/dsniang.png" if="{{$item.kind === 'image'}}" />
<div class="approve-box" if="{{$item.kind === 'approval'}}">
<input class="approve-btn allow" type="button" value="允许" />
@@ -290,9 +290,9 @@ export default {
} else {
this.fontValue = Math.round(14 + (v / 100) * (22 - 14))
}
const lv = Math.round((this.fontValue - 14) / 4)
this.fontLevel = Math.max(0, Math.min(2, lv))
this.fontLabel = ['小', '中', '大'][this.fontLevel]
const lv = Math.round((this.fontValue - 14) / 2)
this.fontLevel = Math.max(0, Math.min(4, lv))
this.fontLabel = ['最小', '小', '中', '大', '特大'][this.fontLevel]
},
confirmFont() {
@@ -551,6 +551,7 @@ export default {
.chat-scroll {
flex: 1;
width: 100%;
flex-direction: column;
}
.chat-img {
@@ -562,6 +563,7 @@ export default {
.chat-msg {
width: 100%;
flex-direction: column;
margin-bottom: 6px;
padding: 7px 9px;
border-radius: 10px;
@@ -732,6 +734,8 @@ export default {
.fl0 { font-size: 15px; line-height: 21px; }
.fl1 { font-size: 17px; line-height: 25px; }
.fl2 { font-size: 19px; line-height: 28px; }
.fl3 { font-size: 21px; line-height: 31px; }
.fl4 { font-size: 23px; line-height: 34px; }
/* ===== 字体大小弹窗 ===== */
.popup {