部分优化

This commit is contained in:
2026-07-07 18:02:55 +08:00
parent b8af01cc69
commit bf5203b081
48 changed files with 3228 additions and 1755 deletions

View File

@@ -1,5 +1,6 @@
.chat-page {
position: relative;
background: linear-gradient(180deg, #f5f4ff 0%, #f8f7fc 50%, #faf9fe 100%);
}
/* 笼罩层样式 */
@@ -9,20 +10,16 @@
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
background-color: rgba(0, 0, 0, 0.45);
backdrop-filter: blur(4px);
-webkit-backdrop-filter: blur(4px);
z-index: 998;
animation: fadeIn 1s ease;
animation: fadeIn 0.3s ease;
}
/* 自定义淡入动画 */
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
from { opacity: 0; }
to { opacity: 1; }
}
/* ================会话侧边栏样式================== */
@@ -34,8 +31,9 @@
max-width: 680rpx;
height: 100%;
transform: translateX(-100%);
transition: transform 0.5s ease;
transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
z-index: 999;
box-shadow: 8rpx 0 30rpx rgba(0, 0, 0, 0.06);
}
.chat-sidebar.sidebar-show {
@@ -53,34 +51,42 @@
display: flex;
align-items: center;
justify-content: center;
background-color: rgba(193, 193, 193, 0.4);
background-color: rgba(30, 30, 50, 0.35);
z-index: 1000;
/* 毛玻璃核心代码 👇 */
backdrop-filter: blur(8px);
-webkit-backdrop-filter: blur(6px);
-webkit-backdrop-filter: blur(8px);
animation: fadeIn 0.25s ease;
}
.ncd-card {
width: 90%;
height: auto;
background-color: #ffffff;
border-radius: 50rpx;
padding: 50rpx;
border-radius: 40rpx;
padding: 50rpx 40rpx;
box-sizing: border-box;
box-shadow: 0 20rpx 60rpx rgba(100, 100, 200, 0.12);
animation: slideUp 0.35s ease;
}
@keyframes slideUp {
from { opacity: 0; transform: translateY(40rpx) scale(0.96); }
to { opacity: 1; transform: translateY(0) scale(1); }
}
.ncd-header {
display: flex;
justify-content: center;
align-items: center;
width: 100%;
}
.ncd-title-eng {
display: flex;
flex-shrink: 0;
background-color: #000;
padding: 5rpx 8rpx;
border-radius: 10rpx;
background: linear-gradient(135deg, #6c63ff, #4a45d1);
padding: 6rpx 14rpx;
border-radius: 12rpx;
justify-content: center;
align-items: center;
}
@@ -88,7 +94,7 @@
.ncd-title-eng text {
color: #ffffff;
font-weight: bold;
font-size: 30rpx;
font-size: 28rpx;
}
.ncd-title-zh {
@@ -96,9 +102,9 @@
display: flex;
flex: 1;
height: 0;
font-size: 38rpx;
font-weight: bold;
color: #000;
font-size: 36rpx;
font-weight: 700;
color: #1a1a2e;
}
.ncd-header uni-icons {
@@ -112,30 +118,41 @@
width: 100%;
justify-content: center;
align-items: center;
margin-top: 10rpx;
margin-top: 20rpx;
box-sizing: border-box;
}
.ncd-option {
width: 100%;
background: #f8fafc;
padding: 50rpx 30rpx;
padding: 40rpx 30rpx;
display: flex;
border-radius: 32rpx;
border-radius: 28rpx;
margin-top: 20rpx;
box-sizing: border-box;
justify-content: center;
align-items: center;
transition: all 0.2s ease;
border: 2rpx solid transparent;
}
.ncd-option:active {
transform: scale(0.98);
}
.ncd-normal {
border: 1rpx solid #e8edf3;
border: 2rpx solid #e8edf3;
}
.ncd-normal:active {
border-color: #c4c8d0;
background: #f0f3f7;
}
.ncd-opt-icon {
width: 80rpx;
height: 80rpx;
border-radius: 30rpx;
border-radius: 24rpx;
padding: 10rpx;
box-sizing: border-box;
display: flex;
@@ -145,7 +162,7 @@
}
.ncd-normal .ncd-opt-icon {
background-color: #e2e8f0;
background: linear-gradient(135deg, #e2e8f0, #d9dfe8);
}
@@ -161,31 +178,36 @@
.ncd-opt-title-1 {
font-size: 30rpx;
font-weight: bold;
color: #000000;
font-weight: 600;
color: #1a1a2e;
}
.ncd-opt-title-2 {
font-size: 26rpx;
color: #666666;
font-size: 24rpx;
color: #888;
margin-top: 4rpx;
}
.arrow-right-style {
display: flex;
flex-shrink: 0;
font-weight: bold !important;
font-size: 30rpx !important;
color: #666666 !important;
font-size: 28rpx !important;
color: #999 !important;
}
.ncd-intelligence {
background: linear-gradient(to right, #f5f3ff, #ede9fe);
border: 1rpx solid #c4b5fd;
background: linear-gradient(135deg, #f8f5ff, #efe8ff);
border: 2rpx solid #c4b5fd;
}
.ncd-intelligence:active {
border-color: #a78bfa;
background: linear-gradient(135deg, #f3efff, #e8dcff);
}
.ncd-intelligence .ncd-opt-icon {
background-color: #8b5cf6;
background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}
/* ==========新建聊天列表相关====== */
@@ -196,7 +218,7 @@
}
.close-option-card .iconfont {
color: #ff0000 !important;
color: #ff4d4f !important;
}
.chat-option-list {
@@ -210,8 +232,14 @@
justify-content: flex-start;
align-items: center;
margin: 10rpx 0;
padding: 16rpx 20rpx;
border-radius: 20rpx;
box-sizing: border-box;
transition: all 0.15s ease;
}
.chat-option:active {
background: rgba(170, 170, 255, 0.08);
}
.chat-option .iconfont {
@@ -219,10 +247,11 @@
}
.option-name {
font-size: 18px;
font-weight: 400;
margin-left: 10px;
font-size: 17px;
font-weight: 500;
margin-left: 12px;
box-sizing: border-box;
color: #333;
}
/* ================聊天容器============== */
@@ -238,13 +267,16 @@
.chat-hearder {
width: 100%;
height: auto;
padding: 20rpx 10rpx;
padding: 16rpx 10rpx;
box-sizing: border-box;
display: flex;
flex-shrink: 0;
justify-content: flex-start;
align-items: center;
border-bottom: 1rpx solid #ede9fe;
background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(255,255,255,0.8));
backdrop-filter: blur(10px);
-webkit-backdrop-filter: blur(10px);
border-bottom: 1rpx solid rgba(170, 170, 255, 0.15);
}
.chat-btn-group {
@@ -256,26 +288,33 @@
}
.head-btn {
padding: 10rpx;
border: 1rpx solid #ede9fe;
border-radius: 20rpx;
padding: 12rpx 14rpx;
border: 1.5rpx solid rgba(170, 170, 255, 0.3);
border-radius: 18rpx;
margin: 0 10rpx;
box-sizing: border-box;
display: flex;
justify-content: center;
align-items: center;
background: rgba(255, 255, 255, 0.7);
transition: all 0.2s ease;
}
.head-btn:active {
background: rgba(170, 170, 255, 0.1);
transform: scale(0.95);
}
.chat-btn-group .head-btn:nth-child(1) .iconfont {
color: #c4b5fd;
color: #a78bfa;
}
.chat-btn-group .head-btn:nth-child(2) .iconfont {
color: cornflowerblue;
color: #6495ed;
}
.head-btn .iconfont {
font-size: 50rpx;
font-size: 48rpx;
}
.log-out {
@@ -283,7 +322,7 @@
}
.log-out .iconfont {
color: #ff0000;
color: #ff4d4f;
}
/* ==========聊天主体部分========== */
@@ -293,7 +332,6 @@
height: 0;
width: 100%;
flex-direction: column;
}
/* ==========聊天对话展示部分========== */
@@ -302,17 +340,36 @@
flex: 1;
height: 0;
width: 100%;
padding: 0rpx 20rpx;
padding: 20rpx 24rpx;
box-sizing: border-box;
flex-direction: column;
overflow: auto;
}
.chat-messages::-webkit-scrollbar {
width: 6rpx;
}
.chat-messages::-webkit-scrollbar-thumb {
background: rgba(170, 170, 255, 0.3);
border-radius: 3rpx;
}
.chat-messages::-webkit-scrollbar-track {
background: transparent;
}
.chat-message {
display: flex;
align-items: flex-start;
margin: 10rpx 0;
margin: 14rpx 0;
box-sizing: border-box;
animation: msgFadeIn 0.3s ease;
}
@keyframes msgFadeIn {
from { opacity: 0; transform: translateY(10rpx); }
to { opacity: 1; transform: translateY(0); }
}
.message-user {
@@ -323,18 +380,19 @@
display: flex;
justify-content: center;
align-items: center;
width: 80rpx;
height: 80rpx;
width: 72rpx;
height: 72rpx;
box-sizing: border-box;
border-radius: 10rpx;
margin-right: 10rpx;
border-radius: 16rpx;
margin-right: 12rpx;
flex-shrink: 0;
}
.friend-avatar {
display: flex;
justify-content: center;
align-items: center;
border-radius: 20rpx;
border-radius: 16rpx;
width: 100%;
height: 100%;
overflow: hidden;
@@ -342,35 +400,47 @@
.chat-avatar-user {
margin-right: 0;
margin-left: 10rpx;
margin-left: 12rpx;
}
.chat-content {
width: auto;
max-width: calc(100% - 100rpx);
max-width: calc(100% - 120rpx);
height: auto;
padding: 20rpx;
padding: 20rpx 24rpx;
box-sizing: border-box;
border: 1rpx solid #999;
border-radius: 24rpx;
overflow-x: auto;
font-size: 28rpx;
line-height: 1.65;
position: relative;
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.04);
background: #ffffff;
border: 1rpx solid #eeeef5;
}
.chat-content-user {
background-color: #c4b5fd;
background: linear-gradient(135deg, #c4b5fd, #b8a5f0);
color: #fff;
border-radius: 20rpx;
border: none;
box-shadow: 0 4rpx 12rpx rgba(170, 170, 255, 0.3);
border-bottom-right-radius: 8rpx;
}
.chat-content:not(.chat-content-user) {
border-bottom-left-radius: 8rpx;
}
/* 图片消息 */
.message-image {
max-width: 300rpx;
border-radius: 8rpx;
margin: 6rpx 0;
border-radius: 12rpx;
margin: 8rpx 0;
}
/* 文件列表 */
.message-file-list {
margin: 8rpx 0;
margin: 10rpx 0;
}
/* 文件项 */
@@ -382,10 +452,16 @@
.message-file {
display: flex;
align-items: center;
padding: 12rpx 16rpx;
background: #f7f8fa;
border-radius: 8rpx;
padding: 14rpx 18rpx;
background: rgba(255, 255, 255, 0.85);
border-radius: 12rpx;
max-width: 350rpx;
border: 1rpx solid #eeeef5;
}
.chat-content-user .message-file {
background: rgba(255, 255, 255, 0.25);
border-color: rgba(255, 255, 255, 0.3);
}
.file-icon {
@@ -402,27 +478,39 @@
text-overflow: ellipsis;
}
.chat-content-user .file-name {
color: #fff;
}
.file-size {
font-size: 22rpx;
color: #999;
margin-left: 8rpx;
}
.chat-content-user .file-size {
color: rgba(255, 255, 255, 0.7);
}
/* ==========聊天输入容器部分========== */
.chat-interactive-container {
display: flex;
flex-shrink: 0;
width: 100%;
padding: 20rpx;
padding: 16rpx 24rpx 24rpx;
box-sizing: border-box;
flex-direction: column;
background: linear-gradient(180deg, rgba(255,255,255,0.7), rgba(255,255,255,0.95));
backdrop-filter: blur(10px);
-webkit-backdrop-filter: blur(10px);
border-top: 1rpx solid rgba(170, 170, 255, 0.12);
}
.chat-interactive-group {
display: flex;
width: 100%;
padding: 20rpx;
padding: 12rpx 0;
box-sizing: border-box;
justify-content: flex-start;
align-items: center;
@@ -432,21 +520,47 @@
display: flex;
align-items: center;
justify-content: center;
border: 1rpx solid #000000;
border-radius: 10rpx;
padding: 10rpx 16rpx;
margin-right: 20rpx;
border: 1.5rpx solid #d4d4e0;
border-radius: 16rpx;
padding: 12rpx 20rpx;
margin-right: 16rpx;
box-sizing: border-box;
font-size: 24rpx;
color: #666;
background: #ffffff;
transition: all 0.2s ease;
}
.chat-interactive-btn:active {
border-color: #aaaaff;
background: rgba(170, 170, 255, 0.08);
transform: scale(0.96);
}
/* 思考中禁用态 */
.chat-interactive-btn.disabled {
opacity: 0.45;
pointer-events: none;
border-color: #e0dfe8;
color: #aaa;
}
.chat-input-container {
display: flex;
width: 100%;
padding: 20rpx;
padding: 8rpx 8rpx 8rpx 24rpx;
box-sizing: border-box;
border: 1rpx solid #c4b5fd;
border: 2rpx solid #e0dff5;
border-radius: 30rpx;
align-items: flex-end;
background: #ffffff;
transition: all 0.25s ease;
box-shadow: 0 2rpx 12rpx rgba(100, 100, 150, 0.06);
}
.chat-input-container:focus-within {
border-color: #aaaaff;
box-shadow: 0 0 0 4rpx rgba(170, 170, 255, 0.12), 0 4rpx 16rpx rgba(100, 100, 150, 0.08);
}
.message-input {
@@ -454,8 +568,34 @@
max-height: 150rpx;
min-height: 60rpx;
overflow-y: auto;
margin: 10rpx;
margin: 4rpx 10rpx;
box-sizing: border-box;
font-size: 28rpx;
color: #333;
}
.message-input::placeholder {
color: #c0c0d0;
}
/* 思考中:输入容器禁态 */
.chat-input-container.input-disabled {
border-color: #eae9f2;
background: #f8f7fc;
}
/* 思考中:文本域禁用 */
.message-input[disabled] {
opacity: 0.5;
color: #bbb;
}
/* 思考中:发送按钮禁用 */
.input-btn-group.disabled {
opacity: 0.4;
pointer-events: none;
background: #c0c0d0;
box-shadow: none;
}
.input-btn-group {
@@ -463,25 +603,32 @@
display: flex;
justify-content: center;
align-items: center;
padding: 16rpx;
padding: 14rpx;
box-sizing: border-box;
background: #ffd4d4;
border: 1rpx solid #ff0000;
border-radius: 20rpx;
width: 80rpx;
height: 80rpx;
background: linear-gradient(135deg, #6c63ff, #8b7cfb);
border-radius: 22rpx;
width: 72rpx;
height: 72rpx;
box-shadow: 0 4rpx 12rpx rgba(108, 99, 255, 0.35);
transition: all 0.2s ease;
}
.input-btn-group:active {
transform: scale(0.92);
box-shadow: 0 2rpx 6rpx rgba(108, 99, 255, 0.25);
}
.input-btn-group .iconfont {
color: #ff0000;
font-size: 40rpx;
color: #fff;
font-size: 36rpx;
}
/* ai思考弹窗卡片 */
.ai-card {
width: auto;
border: 1rpx solid #409eff;
box-shadow: 0 0 20rpx #c4b5fd;
border: 2rpx solid rgba(64, 158, 255, 0.3);
box-shadow: 0 8rpx 30rpx rgba(170, 170, 255, 0.2);
border-radius: 32rpx !important;
}
/* 内容布局 */
@@ -501,41 +648,144 @@
}
.dot {
width: 16rpx;
height: 16rpx;
width: 14rpx;
height: 14rpx;
margin: 6rpx;
border-radius: 50%;
background: #409eff;
background: linear-gradient(135deg, #409eff, #6db2ff);
animation: dotBlink 1.2s infinite ease-in-out;
}
/* 点点呼吸动画 */
@keyframes dotBlink {
0%,
100% {
0%, 100% {
opacity: 0.3;
transform: scale(0.8);
transform: scale(0.7);
}
50% {
opacity: 1;
transform: scale(1);
transform: scale(1.2);
}
}
.dot:nth-child(2) {
animation-delay: 0.2s;
}
.dot:nth-child(3) {
animation-delay: 0.4s;
}
.dot:nth-child(2) { animation-delay: 0.25s; }
.dot:nth-child(3) { animation-delay: 0.5s; }
/* 文字 */
.thinking-text {
margin: 20rpx 0;
font-size: 22px;
font-weight: 500;
font-size: 20px;
font-weight: 600;
color: #409eff;
}
}
/* 思考弹窗中的中断按钮 */
.stop-thinking-btn {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
padding: 22rpx 0;
margin-top: 20rpx;
border-radius: 24rpx;
font-size: 28rpx;
font-weight: 600;
color: #ff4d4f;
background: linear-gradient(135deg, rgba(255, 77, 79, 0.06), rgba(255, 77, 79, 0.02));
border: 2rpx solid rgba(255, 77, 79, 0.35);
transition: all 0.2s ease;
animation: pulseStop 2s ease-in-out infinite;
}
.stop-thinking-btn:active {
background: rgba(255, 77, 79, 0.12);
border-color: #ff4d4f;
transform: scale(0.97);
}
@keyframes pulseStop {
0%, 100% { border-color: rgba(255, 77, 79, 0.35); }
50% { border-color: rgba(255, 77, 79, 0.65); }
}
/* ========== 文件预览标签列表 ========== */
.image-list {
width: 100%;
padding: 8rpx 0 2rpx;
animation: fadeIn 0.25s ease;
}
.image-tags {
display: flex;
flex-wrap: wrap;
gap: 10rpx;
}
.image-tag {
display: flex;
align-items: center;
padding: 6rpx 8rpx 6rpx 16rpx;
background: linear-gradient(135deg, rgba(108, 99, 255, 0.07), rgba(108, 99, 255, 0.04));
border: 1rpx solid rgba(108, 99, 255, 0.18);
border-radius: 20rpx;
max-width: 220rpx;
transition: all 0.2s ease;
box-shadow: 0 1rpx 4rpx rgba(108, 99, 255, 0.04);
}
.image-tag:active {
transform: scale(0.96);
border-color: rgba(108, 99, 255, 0.4);
background: rgba(108, 99, 255, 0.1);
}
.tag-name {
font-size: 22rpx;
color: #5a52d5;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
flex: 1;
font-weight: 500;
}
.tag-close {
flex-shrink: 0;
width: 32rpx;
height: 32rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 28rpx;
color: #bbb;
margin-left: 6rpx;
border-radius: 50%;
line-height: 1;
transition: all 0.15s ease;
}
.tag-close:active {
color: #fff;
background: #ff4d4f;
transform: scale(1.1);
}
/* 消息详情弹窗 */
.message-detail-card {
width: 90%;
max-height: 80vh;
display: flex;
flex-direction: column;
border-radius: 40rpx;
}
.message-detail-content {
flex: 1;
max-height: 60vh;
overflow-y: auto;
padding: 20rpx 0;
font-size: 28rpx;
line-height: 1.7;
color: #333333;
white-space: pre-wrap;
word-break: break-all;
}