chore:用户的消息,图片在上文字在下
This commit is contained in:
@@ -53,13 +53,14 @@
|
||||
<!-- 用户消息 (WorkBuddy 风格: 右对齐 + 浅灰气泡 + 头像在右) -->
|
||||
<view v-if="message.role === 'user'" class="user-message">
|
||||
<view class="message-content">
|
||||
<view v-if="message.type === 'image'">
|
||||
<view v-if="message.type === 'image'" class="user-media-group">
|
||||
<!-- 图片气泡 (在上, 与下方文字气泡同列右对齐) -->
|
||||
<view class="message-bubble user-image-bubble">
|
||||
<image :src="message.imageUrl" mode="aspectFill" class="user-image" />
|
||||
<view v-if="message.uploading" class="upload-mask"><text class="upload-tip">上传中...</text></view>
|
||||
<view v-if="message.uploadError" class="upload-mask upload-error"><text class="upload-tip">{{ message.uploadError }}</text></view>
|
||||
</view>
|
||||
<!-- 图片配文: 图文一起发出时, 文字显示在图片下方 -->
|
||||
<!-- 图片配文: 独立气泡, 显示在图片下方 -->
|
||||
<view v-if="message.content" class="message-bubble image-caption-bubble">
|
||||
<text class="message-text" selectable>{{ message.content }}</text>
|
||||
</view>
|
||||
@@ -4646,6 +4647,16 @@ _handleStreamError(msg) {
|
||||
}
|
||||
}
|
||||
|
||||
/* 用户图文消息容器: 让图片气泡与文字气泡在同一列内右对齐,
|
||||
图片自然落在文字气泡的正上方 (而不是贴在左上角) */
|
||||
.user-media-group {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-end;
|
||||
max-width: 100%;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
/* 用户图片气泡 */
|
||||
.user-image-bubble {
|
||||
padding: 6rpx !important;
|
||||
@@ -4714,7 +4725,7 @@ _handleStreamError(msg) {
|
||||
}
|
||||
}
|
||||
|
||||
/* 图片消息配文气泡 (图文一起发出时, 显示在图片下方) */
|
||||
/* 图片消息配文气泡 (图文一起发出时, 独立气泡显示在图片下方) */
|
||||
.image-caption-bubble {
|
||||
margin-top: 10rpx;
|
||||
background: #f5f5f5;
|
||||
|
||||
Reference in New Issue
Block a user