|
|
@ -50,7 +50,8 @@ |
|
|
:src="session.otherUserAvatar" |
|
|
:src="session.otherUserAvatar" |
|
|
:style="{ backgroundColor: getAvatarColor(session.otherUserName) }" |
|
|
:style="{ backgroundColor: getAvatarColor(session.otherUserName) }" |
|
|
> |
|
|
> |
|
|
{{ getAvatarText(session.otherUserName) }} |
|
|
|
|
|
|
|
|
<!-- {{ getAvatarText(session.otherUserName) }} --> |
|
|
|
|
|
<img :src="baseUrl+session.otherUserAvatar" alt=""> |
|
|
</el-avatar> |
|
|
</el-avatar> |
|
|
<span |
|
|
<span |
|
|
class="online-status" |
|
|
class="online-status" |
|
|
@ -176,7 +177,6 @@ |
|
|
<span v-if="message.isRead === 1" class="read-status">已读</span> |
|
|
<span v-if="message.isRead === 1" class="read-status">已读</span> |
|
|
<span v-else-if="message.temp" class="read-status">发送中</span> |
|
|
<span v-else-if="message.temp" class="read-status">发送中</span> |
|
|
<span v-else-if="message.failed" class="read-status" style="color: #F56C6C;">失败</span> |
|
|
<span v-else-if="message.failed" class="read-status" style="color: #F56C6C;">失败</span> |
|
|
<span v-else class="read-status">未读</span> |
|
|
|
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
@ -281,7 +281,8 @@ export default { |
|
|
lastHeartbeatTime: null, |
|
|
lastHeartbeatTime: null, |
|
|
wsRetryCount: 0, |
|
|
wsRetryCount: 0, |
|
|
maxRetries: 3, |
|
|
maxRetries: 3, |
|
|
shouldAutoScroll: true |
|
|
|
|
|
|
|
|
shouldAutoScroll: true, |
|
|
|
|
|
baseUrl:process.env.VUE_APP_BASE_API |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
@ -942,53 +943,110 @@ export default { |
|
|
</script> |
|
|
</script> |
|
|
|
|
|
|
|
|
<style scoped> |
|
|
<style scoped> |
|
|
|
|
|
/* 全局容器优化 */ |
|
|
.app-container { |
|
|
.app-container { |
|
|
height: calc(100vh - 84px); |
|
|
height: calc(100vh - 84px); |
|
|
padding: 20px; |
|
|
padding: 20px; |
|
|
background: #f0f2f5; |
|
|
|
|
|
|
|
|
background: linear-gradient(135deg, #f5f7fa 0%, #eef2f6 100%); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* 页面标题优化 */ |
|
|
.page-header { |
|
|
.page-header { |
|
|
display: flex; |
|
|
display: flex; |
|
|
justify-content: space-between; |
|
|
justify-content: space-between; |
|
|
align-items: center; |
|
|
align-items: center; |
|
|
margin-bottom: 20px; |
|
|
margin-bottom: 20px; |
|
|
|
|
|
padding: 0 8px; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.page-header h2 { |
|
|
.page-header h2 { |
|
|
margin: 0; |
|
|
margin: 0; |
|
|
font-size: 24px; |
|
|
font-size: 24px; |
|
|
font-weight: 600; |
|
|
font-weight: 600; |
|
|
color: #303133; |
|
|
|
|
|
|
|
|
background: linear-gradient(135deg, #303133 0%, #606266 100%); |
|
|
|
|
|
-webkit-background-clip: text; |
|
|
|
|
|
-webkit-text-fill-color: transparent; |
|
|
|
|
|
background-clip: text; |
|
|
|
|
|
letter-spacing: 0.5px; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.header-actions .el-button { |
|
|
|
|
|
border-radius: 20px; |
|
|
|
|
|
transition: all 0.3s ease; |
|
|
|
|
|
box-shadow: 0 2px 6px rgba(64, 158, 255, 0.2); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.header-actions .el-button:hover { |
|
|
|
|
|
transform: translateY(-1px); |
|
|
|
|
|
box-shadow: 0 4px 12px rgba(64, 158, 255, 0.3); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* 聊天主容器优化 */ |
|
|
.chat-container { |
|
|
.chat-container { |
|
|
height: calc(100vh - 140px); |
|
|
height: calc(100vh - 140px); |
|
|
border-radius: 12px; |
|
|
|
|
|
|
|
|
border-radius: 20px; |
|
|
overflow: hidden; |
|
|
overflow: hidden; |
|
|
background: white; |
|
|
background: white; |
|
|
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1); |
|
|
|
|
|
|
|
|
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.02); |
|
|
|
|
|
transition: box-shadow 0.3s ease; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.chat-container:hover { |
|
|
|
|
|
box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* 左侧会话列表优化 */ |
|
|
.chat-sidebar { |
|
|
.chat-sidebar { |
|
|
display: flex; |
|
|
|
|
|
flex-direction: column; |
|
|
|
|
|
border-right: 1px solid #e4e7ed; |
|
|
|
|
|
background: #fff; |
|
|
|
|
|
|
|
|
background: #ffffff; |
|
|
|
|
|
border-right: 1px solid rgba(228, 231, 237, 0.6); |
|
|
|
|
|
transition: background 0.3s ease; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* 搜索区域优化 */ |
|
|
.search-container { |
|
|
.search-container { |
|
|
padding: 16px; |
|
|
|
|
|
border-bottom: 1px solid #e4e7ed; |
|
|
|
|
|
|
|
|
padding: 20px 16px; |
|
|
|
|
|
border-bottom: 1px solid #f0f2f5; |
|
|
|
|
|
background: #ffffff; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.search-container .el-input__inner { |
|
|
|
|
|
border-radius: 24px; |
|
|
|
|
|
background: #f5f7fa; |
|
|
|
|
|
border: 1px solid transparent; |
|
|
|
|
|
transition: all 0.3s ease; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.search-container .el-input__inner:focus { |
|
|
|
|
|
background: #ffffff; |
|
|
|
|
|
border-color: #409eff; |
|
|
|
|
|
box-shadow: 0 0 0 3px rgba(64, 158, 255, 0.1); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* 会话列表区域优化 */ |
|
|
.session-list { |
|
|
.session-list { |
|
|
flex: 1; |
|
|
flex: 1; |
|
|
overflow-y: auto; |
|
|
overflow-y: auto; |
|
|
position: relative; |
|
|
|
|
|
min-height: 200px; |
|
|
|
|
|
|
|
|
scroll-behavior: smooth; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.session-list::-webkit-scrollbar { |
|
|
|
|
|
width: 4px; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.session-list::-webkit-scrollbar-track { |
|
|
|
|
|
background: #f5f7fa; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.session-list::-webkit-scrollbar-thumb { |
|
|
|
|
|
background: #dcdfe6; |
|
|
|
|
|
border-radius: 4px; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.session-list::-webkit-scrollbar-thumb:hover { |
|
|
|
|
|
background: #c0c4cc; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* 空状态优化 */ |
|
|
.empty-state { |
|
|
.empty-state { |
|
|
display: flex; |
|
|
display: flex; |
|
|
flex-direction: column; |
|
|
flex-direction: column; |
|
|
@ -996,63 +1054,104 @@ export default { |
|
|
justify-content: center; |
|
|
justify-content: center; |
|
|
height: 300px; |
|
|
height: 300px; |
|
|
color: #909399; |
|
|
color: #909399; |
|
|
|
|
|
animation: fadeIn 0.5s ease; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.empty-state .empty-icon { |
|
|
.empty-state .empty-icon { |
|
|
font-size: 64px; |
|
|
|
|
|
margin-bottom: 16px; |
|
|
|
|
|
color: #c0c4cc; |
|
|
|
|
|
|
|
|
font-size: 72px; |
|
|
|
|
|
margin-bottom: 20px; |
|
|
|
|
|
color: #dcdfe6; |
|
|
|
|
|
transition: transform 0.3s ease; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.empty-state .empty-icon:hover { |
|
|
|
|
|
transform: scale(1.05); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.empty-state .empty-text { |
|
|
.empty-state .empty-text { |
|
|
margin: 0; |
|
|
margin: 0; |
|
|
font-size: 14px; |
|
|
font-size: 14px; |
|
|
|
|
|
font-weight: 400; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* 会话项优化 */ |
|
|
.session-items { |
|
|
.session-items { |
|
|
padding: 8px 0; |
|
|
padding: 8px 0; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.session-item { |
|
|
.session-item { |
|
|
display: flex; |
|
|
display: flex; |
|
|
padding: 12px 16px; |
|
|
|
|
|
|
|
|
padding: 14px 16px; |
|
|
cursor: pointer; |
|
|
cursor: pointer; |
|
|
transition: all 0.3s; |
|
|
|
|
|
border-bottom: 1px solid #f5f5f5; |
|
|
|
|
|
|
|
|
transition: all 0.25s ease; |
|
|
|
|
|
border-bottom: 1px solid #f5f7fa; |
|
|
|
|
|
position: relative; |
|
|
|
|
|
margin: 2px 0; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.session-item:hover { |
|
|
.session-item:hover { |
|
|
background-color: #f5f7fa; |
|
|
|
|
|
|
|
|
background: linear-gradient(90deg, #f8f9fc 0%, #f5f7fa 100%); |
|
|
|
|
|
transform: translateX(2px); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.session-item.active { |
|
|
.session-item.active { |
|
|
background-color: #ecf5ff; |
|
|
|
|
|
|
|
|
background: linear-gradient(90deg, #ecf5ff 0%, #e8f0fe 100%); |
|
|
border-right: 3px solid #409eff; |
|
|
border-right: 3px solid #409eff; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.session-item.active::before { |
|
|
|
|
|
content: ''; |
|
|
|
|
|
position: absolute; |
|
|
|
|
|
left: 0; |
|
|
|
|
|
top: 0; |
|
|
|
|
|
bottom: 0; |
|
|
|
|
|
width: 3px; |
|
|
|
|
|
background: #409eff; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* 头像容器优化 */ |
|
|
.avatar-container { |
|
|
.avatar-container { |
|
|
position: relative; |
|
|
position: relative; |
|
|
margin-right: 12px; |
|
|
|
|
|
|
|
|
margin-right: 14px; |
|
|
|
|
|
transition: transform 0.2s ease; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.session-item:hover .avatar-container { |
|
|
|
|
|
transform: scale(1.02); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* 在线状态指示器优化 */ |
|
|
.online-status { |
|
|
.online-status { |
|
|
position: absolute; |
|
|
position: absolute; |
|
|
bottom: 2px; |
|
|
bottom: 2px; |
|
|
right: 2px; |
|
|
right: 2px; |
|
|
width: 10px; |
|
|
|
|
|
height: 10px; |
|
|
|
|
|
|
|
|
width: 12px; |
|
|
|
|
|
height: 12px; |
|
|
border-radius: 50%; |
|
|
border-radius: 50%; |
|
|
border: 2px solid white; |
|
|
border: 2px solid white; |
|
|
|
|
|
transition: transform 0.2s ease; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.online-status.online { |
|
|
.online-status.online { |
|
|
background-color: #67c23a; |
|
|
background-color: #67c23a; |
|
|
|
|
|
box-shadow: 0 0 0 2px rgba(103, 194, 58, 0.2); |
|
|
|
|
|
animation: pulseOnline 1.5s infinite; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.online-status.offline { |
|
|
.online-status.offline { |
|
|
background-color: #c0c4cc; |
|
|
background-color: #c0c4cc; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@keyframes pulseOnline { |
|
|
|
|
|
0%, 100% { |
|
|
|
|
|
box-shadow: 0 0 0 0 rgba(103, 194, 58, 0.4); |
|
|
|
|
|
} |
|
|
|
|
|
50% { |
|
|
|
|
|
box-shadow: 0 0 0 3px rgba(103, 194, 58, 0.2); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* 会话信息优化 */ |
|
|
.session-info { |
|
|
.session-info { |
|
|
flex: 1; |
|
|
flex: 1; |
|
|
min-width: 0; |
|
|
min-width: 0; |
|
|
@ -1061,48 +1160,62 @@ export default { |
|
|
.info-header { |
|
|
.info-header { |
|
|
display: flex; |
|
|
display: flex; |
|
|
justify-content: space-between; |
|
|
justify-content: space-between; |
|
|
align-items: center; |
|
|
|
|
|
margin-bottom: 4px; |
|
|
|
|
|
|
|
|
align-items: baseline; |
|
|
|
|
|
margin-bottom: 6px; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.session-name { |
|
|
.session-name { |
|
|
font-weight: 500; |
|
|
|
|
|
font-size: 14px; |
|
|
|
|
|
|
|
|
font-weight: 600; |
|
|
|
|
|
font-size: 15px; |
|
|
color: #303133; |
|
|
color: #303133; |
|
|
overflow: hidden; |
|
|
overflow: hidden; |
|
|
text-overflow: ellipsis; |
|
|
text-overflow: ellipsis; |
|
|
white-space: nowrap; |
|
|
white-space: nowrap; |
|
|
|
|
|
letter-spacing: -0.2px; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.session-time { |
|
|
.session-time { |
|
|
font-size: 12px; |
|
|
|
|
|
color: #909399; |
|
|
|
|
|
|
|
|
font-size: 11px; |
|
|
|
|
|
color: #b0b3bc; |
|
|
|
|
|
font-weight: 400; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.session-preview { |
|
|
.session-preview { |
|
|
display: flex; |
|
|
display: flex; |
|
|
justify-content: space-between; |
|
|
justify-content: space-between; |
|
|
align-items: flex-start; |
|
|
|
|
|
|
|
|
align-items: center; |
|
|
|
|
|
gap: 8px; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.preview-text { |
|
|
.preview-text { |
|
|
flex: 1; |
|
|
flex: 1; |
|
|
font-size: 13px; |
|
|
font-size: 13px; |
|
|
color: #606266; |
|
|
|
|
|
|
|
|
color: #909399; |
|
|
overflow: hidden; |
|
|
overflow: hidden; |
|
|
text-overflow: ellipsis; |
|
|
text-overflow: ellipsis; |
|
|
white-space: nowrap; |
|
|
white-space: nowrap; |
|
|
margin-right: 8px; |
|
|
|
|
|
|
|
|
margin: 0; |
|
|
|
|
|
line-height: 1.4; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.unread-badge { |
|
|
|
|
|
flex-shrink: 0; |
|
|
|
|
|
|
|
|
/* 未读徽章优化 */ |
|
|
|
|
|
.unread-badge >>> .el-badge__content { |
|
|
|
|
|
background: #f56c6c; |
|
|
|
|
|
border: none; |
|
|
|
|
|
font-size: 11px; |
|
|
|
|
|
padding: 0 5px; |
|
|
|
|
|
height: 18px; |
|
|
|
|
|
line-height: 18px; |
|
|
|
|
|
border-radius: 9px; |
|
|
|
|
|
box-shadow: 0 2px 4px rgba(245, 108, 108, 0.3); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* 右侧聊天区域优化 */ |
|
|
.chat-main { |
|
|
.chat-main { |
|
|
padding: 0; |
|
|
padding: 0; |
|
|
display: flex; |
|
|
display: flex; |
|
|
flex-direction: column; |
|
|
flex-direction: column; |
|
|
|
|
|
background: #f8f9fc; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.chat-content { |
|
|
.chat-content { |
|
|
@ -1110,15 +1223,30 @@ export default { |
|
|
display: flex; |
|
|
display: flex; |
|
|
flex-direction: column; |
|
|
flex-direction: column; |
|
|
height: 100%; |
|
|
height: 100%; |
|
|
|
|
|
animation: slideIn 0.3s ease; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@keyframes slideIn { |
|
|
|
|
|
from { |
|
|
|
|
|
opacity: 0; |
|
|
|
|
|
transform: translateX(10px); |
|
|
|
|
|
} |
|
|
|
|
|
to { |
|
|
|
|
|
opacity: 1; |
|
|
|
|
|
transform: translateX(0); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* 聊天头部优化 */ |
|
|
.chat-header { |
|
|
.chat-header { |
|
|
display: flex; |
|
|
display: flex; |
|
|
justify-content: space-between; |
|
|
justify-content: space-between; |
|
|
align-items: center; |
|
|
align-items: center; |
|
|
padding: 16px 20px; |
|
|
|
|
|
border-bottom: 1px solid #e4e7ed; |
|
|
|
|
|
background: white; |
|
|
|
|
|
|
|
|
padding: 16px 24px; |
|
|
|
|
|
border-bottom: 1px solid rgba(228, 231, 237, 0.6); |
|
|
|
|
|
background: #ffffff; |
|
|
|
|
|
backdrop-filter: blur(10px); |
|
|
|
|
|
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.02); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.header-left { |
|
|
.header-left { |
|
|
@ -1128,13 +1256,14 @@ export default { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.header-info { |
|
|
.header-info { |
|
|
margin-left: 12px; |
|
|
|
|
|
|
|
|
margin-left: 14px; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.header-info .chat-title { |
|
|
.header-info .chat-title { |
|
|
margin: 0 0 4px 0; |
|
|
|
|
|
font-size: 16px; |
|
|
|
|
|
font-weight: 500; |
|
|
|
|
|
|
|
|
margin: 0 0 6px 0; |
|
|
|
|
|
font-size: 18px; |
|
|
|
|
|
font-weight: 600; |
|
|
|
|
|
color: #303133; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.chat-subtitle { |
|
|
.chat-subtitle { |
|
|
@ -1144,145 +1273,235 @@ export default { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.status-text { |
|
|
.status-text { |
|
|
display: flex; |
|
|
|
|
|
|
|
|
display: inline-flex; |
|
|
align-items: center; |
|
|
align-items: center; |
|
|
font-size: 12px; |
|
|
font-size: 12px; |
|
|
|
|
|
padding: 4px 8px; |
|
|
|
|
|
border-radius: 20px; |
|
|
|
|
|
background: #f5f7fa; |
|
|
color: #909399; |
|
|
color: #909399; |
|
|
|
|
|
transition: all 0.2s ease; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.status-text.online { |
|
|
.status-text.online { |
|
|
|
|
|
background: rgba(103, 194, 58, 0.1); |
|
|
color: #67c23a; |
|
|
color: #67c23a; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.status-icon { |
|
|
.status-icon { |
|
|
margin-right: 4px; |
|
|
margin-right: 4px; |
|
|
|
|
|
font-size: 12px; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* 消息容器优化 */ |
|
|
.message-container { |
|
|
.message-container { |
|
|
flex: 1; |
|
|
flex: 1; |
|
|
position: relative; |
|
|
position: relative; |
|
|
overflow: hidden; |
|
|
overflow: hidden; |
|
|
background: #f5f7fa; |
|
|
|
|
|
|
|
|
background: #f8f9fc; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.message-list { |
|
|
.message-list { |
|
|
height: 100%; |
|
|
height: 100%; |
|
|
padding: 20px; |
|
|
|
|
|
|
|
|
padding: 20px 24px; |
|
|
overflow-y: auto; |
|
|
overflow-y: auto; |
|
|
|
|
|
scroll-behavior: smooth; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.message-list::-webkit-scrollbar { |
|
|
|
|
|
width: 6px; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.message-list::-webkit-scrollbar-track { |
|
|
|
|
|
background: #e9ecef; |
|
|
|
|
|
border-radius: 3px; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.message-list::-webkit-scrollbar-thumb { |
|
|
|
|
|
background: #cbd5e0; |
|
|
|
|
|
border-radius: 3px; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.message-list::-webkit-scrollbar-thumb:hover { |
|
|
|
|
|
background: #a0aec0; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* 加载更多提示优化 */ |
|
|
.load-more-hint { |
|
|
.load-more-hint { |
|
|
text-align: center; |
|
|
text-align: center; |
|
|
padding: 10px; |
|
|
|
|
|
color: #909399; |
|
|
|
|
|
|
|
|
padding: 12px; |
|
|
|
|
|
color: #409eff; |
|
|
font-size: 12px; |
|
|
font-size: 12px; |
|
|
cursor: pointer; |
|
|
cursor: pointer; |
|
|
|
|
|
transition: all 0.2s ease; |
|
|
|
|
|
border-radius: 20px; |
|
|
|
|
|
margin: 8px auto; |
|
|
|
|
|
width: fit-content; |
|
|
|
|
|
background: rgba(64, 158, 255, 0.05); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.load-more-hint:hover { |
|
|
.load-more-hint:hover { |
|
|
color: #409eff; |
|
|
|
|
|
|
|
|
background: rgba(64, 158, 255, 0.1); |
|
|
|
|
|
transform: scale(1.02); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.loading-more { |
|
|
.loading-more { |
|
|
text-align: center; |
|
|
text-align: center; |
|
|
padding: 10px; |
|
|
|
|
|
|
|
|
padding: 12px; |
|
|
color: #909399; |
|
|
color: #909399; |
|
|
font-size: 12px; |
|
|
font-size: 12px; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.message-item-wrapper { |
|
|
|
|
|
margin-bottom: 16px; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* 消息时间分隔线优化 */ |
|
|
.message-time-divider { |
|
|
.message-time-divider { |
|
|
text-align: center; |
|
|
text-align: center; |
|
|
margin: 16px 0; |
|
|
|
|
|
|
|
|
margin: 20px 0; |
|
|
|
|
|
position: relative; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.time-text { |
|
|
.time-text { |
|
|
font-size: 12px; |
|
|
|
|
|
color: #909399; |
|
|
|
|
|
background: #f5f5f5; |
|
|
|
|
|
padding: 4px 12px; |
|
|
|
|
|
border-radius: 12px; |
|
|
|
|
|
|
|
|
font-size: 11px; |
|
|
|
|
|
color: #a0aec0; |
|
|
|
|
|
background: rgba(224, 230, 237, 0.6); |
|
|
|
|
|
padding: 4px 14px; |
|
|
|
|
|
border-radius: 20px; |
|
|
|
|
|
backdrop-filter: blur(4px); |
|
|
|
|
|
letter-spacing: 0.3px; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/* ===== 完全重构的消息样式 ===== */ |
|
|
|
|
|
|
|
|
/* 消息项优化 */ |
|
|
|
|
|
.message-item-wrapper { |
|
|
|
|
|
margin-bottom: 20px; |
|
|
|
|
|
animation: messageFadeIn 0.3s ease; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@keyframes messageFadeIn { |
|
|
|
|
|
from { |
|
|
|
|
|
opacity: 0; |
|
|
|
|
|
transform: translateY(8px); |
|
|
|
|
|
} |
|
|
|
|
|
to { |
|
|
|
|
|
opacity: 1; |
|
|
|
|
|
transform: translateY(0); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* 消息布局优化 */ |
|
|
.message-item { |
|
|
.message-item { |
|
|
display: flex; |
|
|
display: flex; |
|
|
width: 100%; |
|
|
width: 100%; |
|
|
margin-bottom: 16px; |
|
|
|
|
|
|
|
|
margin-bottom: 4px; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/* 头像盒子固定宽度 */ |
|
|
|
|
|
|
|
|
/* 头像盒子 */ |
|
|
.avatar-box { |
|
|
.avatar-box { |
|
|
width: 36px; |
|
|
width: 36px; |
|
|
flex-shrink: 0; |
|
|
flex-shrink: 0; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/* 内容盒子自适应 */ |
|
|
|
|
|
|
|
|
/* 内容盒子优化 */ |
|
|
.content-box { |
|
|
.content-box { |
|
|
flex: 1; |
|
|
flex: 1; |
|
|
padding: 0 10px; |
|
|
|
|
|
|
|
|
padding: 0 12px; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/* 气泡基础样式 */ |
|
|
|
|
|
|
|
|
/* 气泡优化 */ |
|
|
.bubble { |
|
|
.bubble { |
|
|
display: inline-block; |
|
|
display: inline-block; |
|
|
max-width: 80%; |
|
|
max-width: 80%; |
|
|
padding: 10px 14px; |
|
|
|
|
|
border-radius: 18px; |
|
|
|
|
|
|
|
|
padding: 10px 16px; |
|
|
|
|
|
border-radius: 20px; |
|
|
word-break: break-word; |
|
|
word-break: break-word; |
|
|
position: relative; |
|
|
position: relative; |
|
|
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); |
|
|
|
|
|
|
|
|
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); |
|
|
|
|
|
transition: all 0.2s ease; |
|
|
|
|
|
font-size: 14px; |
|
|
|
|
|
line-height: 1.5; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/* 自己消息的气泡 */ |
|
|
|
|
|
|
|
|
.bubble:hover { |
|
|
|
|
|
transform: translateY(-1px); |
|
|
|
|
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* 自己消息气泡优化 */ |
|
|
.me-bubble { |
|
|
.me-bubble { |
|
|
background: #95ec69; |
|
|
|
|
|
border-top-right-radius: 4px; |
|
|
|
|
|
|
|
|
background: linear-gradient(135deg, #95ec69 0%, #85d85a 100%); |
|
|
|
|
|
border-top-right-radius: 6px; |
|
|
text-align: left; |
|
|
text-align: left; |
|
|
|
|
|
color: #1e2a3a; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/* 对方消息的气泡 */ |
|
|
|
|
|
|
|
|
/* 对方消息气泡优化 */ |
|
|
.other-bubble { |
|
|
.other-bubble { |
|
|
background: white; |
|
|
|
|
|
border-top-left-radius: 4px; |
|
|
|
|
|
|
|
|
background: #ffffff; |
|
|
|
|
|
border-top-left-radius: 6px; |
|
|
text-align: left; |
|
|
text-align: left; |
|
|
|
|
|
color: #2c3e50; |
|
|
|
|
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/* 时间显示 */ |
|
|
|
|
|
|
|
|
/* 时间信息优化 */ |
|
|
.time { |
|
|
.time { |
|
|
font-size: 11px; |
|
|
|
|
|
color: #909399; |
|
|
|
|
|
margin-top: 4px; |
|
|
|
|
|
text-align: right; |
|
|
|
|
|
|
|
|
font-size: 10px; |
|
|
|
|
|
color: rgba(0, 0, 0, 0.45); |
|
|
|
|
|
margin-top: 6px; |
|
|
|
|
|
display: flex; |
|
|
|
|
|
align-items: center; |
|
|
|
|
|
justify-content: flex-end; |
|
|
|
|
|
gap: 6px; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.me-bubble .time { |
|
|
|
|
|
color: rgba(0, 0, 0, 0.5); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.other-bubble .time { |
|
|
|
|
|
color: #94a3b8; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.read-status { |
|
|
.read-status { |
|
|
margin-left: 4px; |
|
|
margin-left: 4px; |
|
|
|
|
|
font-size: 10px; |
|
|
|
|
|
font-weight: 400; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* 输入区域优化 */ |
|
|
.input-container { |
|
|
.input-container { |
|
|
border-top: 1px solid #e4e7ed; |
|
|
|
|
|
background: white; |
|
|
|
|
|
|
|
|
border-top: 1px solid rgba(228, 231, 237, 0.6); |
|
|
|
|
|
background: #ffffff; |
|
|
|
|
|
backdrop-filter: blur(10px); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.input-area { |
|
|
.input-area { |
|
|
padding: 12px 20px; |
|
|
|
|
|
|
|
|
padding: 16px 24px; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.message-input >>> .el-textarea__inner { |
|
|
.message-input >>> .el-textarea__inner { |
|
|
border: none; |
|
|
|
|
|
border-radius: 8px; |
|
|
|
|
|
background: #f5f7fa; |
|
|
|
|
|
padding-right: 100px; |
|
|
|
|
|
|
|
|
border: 1px solid #e2e8f0; |
|
|
|
|
|
border-radius: 16px; |
|
|
|
|
|
background: #fafbfc; |
|
|
|
|
|
padding: 12px 80px 12px 16px; |
|
|
resize: none; |
|
|
resize: none; |
|
|
|
|
|
font-size: 14px; |
|
|
|
|
|
transition: all 0.3s ease; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.message-input >>> .el-textarea__inner:focus { |
|
|
.message-input >>> .el-textarea__inner:focus { |
|
|
background: white; |
|
|
|
|
|
box-shadow: 0 0 0 1px #409eff inset; |
|
|
|
|
|
|
|
|
background: #ffffff; |
|
|
|
|
|
border-color: #409eff; |
|
|
|
|
|
box-shadow: 0 0 0 3px rgba(64, 158, 255, 0.1); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.message-input >>> .el-textarea__inner:hover { |
|
|
|
|
|
border-color: #cbd5e0; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.message-input >>> .el-textarea .el-textarea__count { |
|
|
|
|
|
background: transparent; |
|
|
|
|
|
bottom: 8px; |
|
|
|
|
|
right: 12px; |
|
|
|
|
|
font-size: 11px; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.input-actions { |
|
|
.input-actions { |
|
|
@ -1290,36 +1509,101 @@ export default { |
|
|
align-items: center; |
|
|
align-items: center; |
|
|
justify-content: flex-end; |
|
|
justify-content: flex-end; |
|
|
height: 100%; |
|
|
height: 100%; |
|
|
|
|
|
gap: 12px; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.send-button { |
|
|
.send-button { |
|
|
height: 32px; |
|
|
|
|
|
padding: 0 20px; |
|
|
|
|
|
|
|
|
height: 38px; |
|
|
|
|
|
padding: 0 28px; |
|
|
|
|
|
border-radius: 24px; |
|
|
|
|
|
font-weight: 500; |
|
|
|
|
|
transition: all 0.3s ease; |
|
|
|
|
|
background: linear-gradient(135deg, #409eff 0%, #3a8ee6 100%); |
|
|
|
|
|
border: none; |
|
|
|
|
|
box-shadow: 0 2px 6px rgba(64, 158, 255, 0.3); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.send-button:hover:not(:disabled) { |
|
|
|
|
|
transform: translateY(-2px); |
|
|
|
|
|
box-shadow: 0 4px 12px rgba(64, 158, 255, 0.4); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.send-button:active:not(:disabled) { |
|
|
|
|
|
transform: translateY(0); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* 空聊天状态优化 */ |
|
|
.empty-chat { |
|
|
.empty-chat { |
|
|
flex: 1; |
|
|
flex: 1; |
|
|
display: flex; |
|
|
display: flex; |
|
|
align-items: center; |
|
|
align-items: center; |
|
|
justify-content: center; |
|
|
justify-content: center; |
|
|
background: #f5f7fa; |
|
|
|
|
|
|
|
|
background: linear-gradient(135deg, #f8f9fc 0%, #f1f5f9 100%); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.empty-content { |
|
|
.empty-content { |
|
|
text-align: center; |
|
|
text-align: center; |
|
|
max-width: 400px; |
|
|
max-width: 400px; |
|
|
|
|
|
animation: fadeInUp 0.5s ease; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@keyframes fadeInUp { |
|
|
|
|
|
from { |
|
|
|
|
|
opacity: 0; |
|
|
|
|
|
transform: translateY(20px); |
|
|
|
|
|
} |
|
|
|
|
|
to { |
|
|
|
|
|
opacity: 1; |
|
|
|
|
|
transform: translateY(0); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.empty-content .empty-icon { |
|
|
.empty-content .empty-icon { |
|
|
font-size: 64px; |
|
|
|
|
|
color: #c0c4cc; |
|
|
|
|
|
margin-bottom: 20px; |
|
|
|
|
|
|
|
|
font-size: 80px; |
|
|
|
|
|
color: #cbd5e0; |
|
|
|
|
|
margin-bottom: 24px; |
|
|
|
|
|
transition: transform 0.3s ease; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.empty-content .empty-icon:hover { |
|
|
|
|
|
transform: scale(1.05); |
|
|
|
|
|
color: #94a3b8; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.empty-content .empty-title { |
|
|
.empty-content .empty-title { |
|
|
margin: 0; |
|
|
margin: 0; |
|
|
font-size: 20px; |
|
|
|
|
|
|
|
|
font-size: 18px; |
|
|
font-weight: 500; |
|
|
font-weight: 500; |
|
|
color: #303133; |
|
|
|
|
|
|
|
|
color: #64748b; |
|
|
|
|
|
letter-spacing: -0.2px; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* 通用动画 */ |
|
|
|
|
|
@keyframes fadeIn { |
|
|
|
|
|
from { |
|
|
|
|
|
opacity: 0; |
|
|
|
|
|
} |
|
|
|
|
|
to { |
|
|
|
|
|
opacity: 1; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* 响应式调整 */ |
|
|
|
|
|
@media (max-width: 768px) { |
|
|
|
|
|
.app-container { |
|
|
|
|
|
padding: 12px; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.chat-sidebar { |
|
|
|
|
|
width: 280px !important; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.bubble { |
|
|
|
|
|
max-width: 90%; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.message-list { |
|
|
|
|
|
padding: 16px; |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
</style> |
|
|
|
|
|
|
|
|
</style> |