248 lines
4.6 KiB
CSS
248 lines
4.6 KiB
CSS
/* 聊天布局样式 */
|
|
|
|
/* 聊天容器 - 自适应布局 */
|
|
.chat-container {
|
|
height: 100%;
|
|
min-height: 100%;
|
|
width: 100%;
|
|
flex-direction: column;
|
|
background: #fff;
|
|
overflow: hidden;
|
|
position: relative;
|
|
border-radius: 8px;
|
|
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
|
margin: 20px auto;
|
|
display: flex;
|
|
}
|
|
|
|
/* 聊天头部 */
|
|
.chat-header {
|
|
flex-shrink: 0;
|
|
height: 60px;
|
|
background: #fff;
|
|
border-bottom: 1px solid #e5e7eb;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 0 20px;
|
|
z-index: 10;
|
|
}
|
|
|
|
.chat-header h1 {
|
|
font-size: 18px;
|
|
font-weight: 600;
|
|
color: #1f2937;
|
|
margin: 0;
|
|
}
|
|
|
|
/* 聊天消息列表容器 */
|
|
.chat-messages {
|
|
flex: 1;
|
|
overflow-y: auto;
|
|
overflow-x: hidden;
|
|
padding: 20px;
|
|
scroll-behavior: smooth;
|
|
background: #f9fafb;
|
|
position: relative;
|
|
}
|
|
|
|
/* 自定义滚动条 */
|
|
.chat-messages::-webkit-scrollbar {
|
|
width: 6px;
|
|
}
|
|
|
|
.chat-messages::-webkit-scrollbar-track {
|
|
background: transparent;
|
|
}
|
|
|
|
.chat-messages::-webkit-scrollbar-thumb {
|
|
background: #d1d5db;
|
|
border-radius: 3px;
|
|
}
|
|
|
|
.chat-messages::-webkit-scrollbar-thumb:hover {
|
|
background: #9ca3af;
|
|
}
|
|
|
|
/* 新对话欢迎界面 */
|
|
.chat-welcome {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
height: 100%;
|
|
text-align: center;
|
|
padding: 40px 20px;
|
|
}
|
|
|
|
.chat-welcome h3 {
|
|
font-size: 24px;
|
|
font-weight: 600;
|
|
color: #1f2937;
|
|
margin-bottom: 12px;
|
|
}
|
|
|
|
.chat-welcome p {
|
|
font-size: 16px;
|
|
color: #6b7280;
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
/* 加载状态 */
|
|
.chat-loading {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
height: 100%;
|
|
gap: 16px;
|
|
}
|
|
|
|
.chat-loading .ant-spin {
|
|
font-size: 24px;
|
|
}
|
|
|
|
/* 错误状态 */
|
|
.chat-error {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
height: 100%;
|
|
text-align: center;
|
|
padding: 40px 20px;
|
|
}
|
|
|
|
.chat-error h2 {
|
|
font-size: 20px;
|
|
font-weight: 600;
|
|
color: #dc2626;
|
|
margin-bottom: 12px;
|
|
}
|
|
|
|
.chat-error p {
|
|
font-size: 14px;
|
|
color: #6b7280;
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
/* 确保聊天容器在主内容区域中占满全部空间 */
|
|
.main-content .chat-container {
|
|
height: calc(89vh - 0px);
|
|
/* 减去任何顶部导航栏的高度 */
|
|
}
|
|
|
|
/* 如果有面包屑导航,需要调整高度 */
|
|
.main-content .breadcrumb+.chat-container {
|
|
height: calc(100vh - 60px);
|
|
/* 减去面包屑的高度 */
|
|
}
|
|
|
|
/* 侧边栏滚动区域样式 */
|
|
.h-full.overflow-y-auto::-webkit-scrollbar {
|
|
width: 6px;
|
|
}
|
|
|
|
.h-full.overflow-y-auto::-webkit-scrollbar-track {
|
|
background: #f8f9fa;
|
|
border-radius: 3px;
|
|
}
|
|
|
|
.h-full.overflow-y-auto::-webkit-scrollbar-thumb {
|
|
background: #d1d5db;
|
|
border-radius: 3px;
|
|
transition: background-color 0.2s ease;
|
|
}
|
|
|
|
.h-full.overflow-y-auto::-webkit-scrollbar-thumb:hover {
|
|
background: #9ca3af;
|
|
}
|
|
|
|
/* Firefox 滚动条样式 */
|
|
.h-full.overflow-y-auto {
|
|
scrollbar-width: thin;
|
|
scrollbar-color: #d1d5db #f8f9fa;
|
|
}
|
|
|
|
/* 响应式设计 */
|
|
@media (max-width: 768px) {
|
|
.chat-container {
|
|
height: 100vh;
|
|
}
|
|
|
|
.chat-messages {
|
|
padding: 16px;
|
|
}
|
|
|
|
.chat-header {
|
|
padding: 0 16px;
|
|
height: 56px;
|
|
}
|
|
|
|
.chat-header h1 {
|
|
font-size: 16px;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 480px) {
|
|
.chat-messages {
|
|
padding: 12px;
|
|
}
|
|
|
|
.chat-welcome {
|
|
padding: 20px 16px;
|
|
}
|
|
|
|
.chat-welcome h3 {
|
|
font-size: 20px;
|
|
}
|
|
|
|
.chat-welcome p {
|
|
font-size: 14px;
|
|
}
|
|
}
|
|
|
|
/* 全局按钮主题色统一 */
|
|
.ant-btn-primary {
|
|
background-color: rgb(0, 104, 74) !important;
|
|
border-color: rgb(0, 104, 74) !important;
|
|
}
|
|
|
|
.ant-btn-primary:hover {
|
|
background-color: rgba(0, 104, 74, 0.8) !important;
|
|
border-color: rgba(0, 104, 74, 0.8) !important;
|
|
}
|
|
|
|
.ant-btn-primary:focus {
|
|
background-color: rgb(0, 104, 74) !important;
|
|
border-color: rgb(0, 104, 74) !important;
|
|
}
|
|
|
|
.ant-btn-primary:active {
|
|
background-color: rgba(0, 104, 74, 0.9) !important;
|
|
border-color: rgba(0, 104, 74, 0.9) !important;
|
|
}
|
|
|
|
/* 禁用状态保持原样 */
|
|
.ant-btn-primary:disabled {
|
|
background-color: rgba(0, 0, 0, 0.04) !important;
|
|
border-color: #d9d9d9 !important;
|
|
color: rgba(0, 0, 0, 0.25) !important;
|
|
}
|
|
|
|
/* 链接按钮主题色 */
|
|
.ant-btn-link {
|
|
color: rgb(0, 104, 74) !important;
|
|
}
|
|
|
|
.ant-btn-link:hover {
|
|
color: rgba(0, 104, 74, 0.8) !important;
|
|
}
|
|
|
|
.ant-btn-link:focus {
|
|
color: rgb(0, 104, 74) !important;
|
|
}
|
|
|
|
.ant-btn-link:active {
|
|
color: rgba(0, 104, 74, 0.9) !important;
|
|
} |