feat: 优化聊天历史组件样式,添加底部空白区域及调整聊天项间距

This commit is contained in:
yangzhe 2025-07-11 16:04:45 +08:00
parent 8cfd8d3e9c
commit fd51d05c85
1 changed files with 15 additions and 2 deletions

View File

@ -12,7 +12,7 @@
新建对话
</text>
</view>
<scroll-view scroll-y class="chat-history-list">
<scroll-view scroll-y class="chat-history-list" :show-scrollbar="false">
<!-- 使用新的数据结构渲染聊天历史 -->
<view
v-for="(group, groupIndex) in chatHistoryList3"
@ -38,6 +38,9 @@
<text class="chat-text">{{ item.title }}</text>
</view>
</view>
<!-- 添加底部空白区域 -->
<view class="bottom-space"></view>
</scroll-view>
<view class="drawer-footer">
@ -143,6 +146,7 @@ export default {
.chat-history-list {
flex: 1;
height: calc(100vh - 360rpx);
padding-bottom: 20rpx;
.chat-day {
display: flex;
@ -159,6 +163,9 @@ export default {
.chat-item {
padding: 24rpx 30rpx;
border-radius: 16rpx;
margin-bottom: 4rpx;
position: relative;
overflow: hidden;
.chat-text {
font-size: 28rpx;
@ -168,6 +175,7 @@ export default {
&-active {
background-color: #4f6aff;
box-shadow: 0 2rpx 8rpx rgba(79, 106, 255, 0.3);
.chat-text {
color: #fff;
@ -175,6 +183,11 @@ export default {
}
}
}
.bottom-space {
height: 30rpx;
width: 100%;
}
.drawer-footer {
margin-top: 20rpx;
@ -191,7 +204,7 @@ export default {
align-items: center;
.user-avatar {
width: 56rpx;
width: 56rpx;
height: 56rpx;
border-radius: 50%;
margin-right: 30rpx;