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