diff --git a/Yi.Ai.Vue3/src/pages/chat/layouts/chatWithId/index.vue b/Yi.Ai.Vue3/src/pages/chat/layouts/chatWithId/index.vue
index a7ba60d5..2408088a 100644
--- a/Yi.Ai.Vue3/src/pages/chat/layouts/chatWithId/index.vue
+++ b/Yi.Ai.Vue3/src/pages/chat/layouts/chatWithId/index.vue
@@ -2,7 +2,7 @@
@@ -551,12 +616,13 @@ onUnmounted(() => {
/>
-
+
+
{
+
+
+
+
+
+
{
color: var(--el-color-primary);
animation: rotating 2s linear infinite;
}
+
+ // ==================== 消息包装器样式 ====================
+ &__messages-wrapper {
+ position: relative;
+ flex: 1;
+ display: flex;
+ flex-direction: column;
+ min-height: 0;
+ overflow-y: auto;
+ overflow-x: hidden;
+
+ // 平滑滚动
+ scroll-behavior: smooth;
+
+ // Webkit 浏览器滚动条样式 (Chrome, Safari, Edge)
+ &::-webkit-scrollbar {
+ width: 6px;
+ }
+
+ &::-webkit-scrollbar-track {
+ background: transparent;
+ }
+
+ &::-webkit-scrollbar-thumb {
+ background: rgba(144, 147, 153, 0.3);
+ border-radius: 3px;
+ transition: background 0.2s ease;
+
+ &:hover {
+ background: rgba(144, 147, 153, 0.5);
+ }
+ }
+
+ // Firefox 滚动条样式
+ scrollbar-width: thin;
+ scrollbar-color: rgba(144, 147, 153, 0.3) transparent;
+ }
+
+ // ==================== 滚动到底部按钮 ====================
+ &__scroll-bottom-btn {
+ position: absolute;
+ bottom: 20px;
+ right: 20px;
+ width: 40px;
+ height: 40px;
+ border-radius: 50%;
+ background: var(--el-bg-color);
+ border: 1px solid var(--el-border-color);
+ box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
+ cursor: pointer;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ color: var(--el-text-color-secondary);
+ font-size: 18px;
+ transition: all 0.3s ease;
+ z-index: 10;
+
+ &:hover {
+ background: var(--el-color-primary);
+ border-color: var(--el-color-primary);
+ color: #fff;
+ transform: scale(1.05);
+ box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
+ }
+
+ &:active {
+ transform: scale(0.95);
+ }
+
+ @media (max-width: 768px) {
+ width: 36px;
+ height: 36px;
+ bottom: 16px;
+ right: 16px;
+ font-size: 16px;
+ }
+ }
}
// 气泡列表基础样式覆盖
@@ -752,4 +908,16 @@ onUnmounted(() => {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
+
+// ==================== 滚动按钮过渡动画 ====================
+.scroll-btn-fade-enter-active,
+.scroll-btn-fade-leave-active {
+ transition: all 0.3s ease;
+}
+
+.scroll-btn-fade-enter-from,
+.scroll-btn-fade-leave-to {
+ opacity: 0;
+ transform: translateY(10px);
+}