From 962c0489a34a1abfd9400cf2909cff4575942f3a Mon Sep 17 00:00:00 2001 From: Gsh <15170702455@163.com> Date: Sat, 14 Feb 2026 22:00:09 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=AF=B9=E8=AF=9D=E9=80=89=E4=B8=AD?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E5=A2=9E=E5=BC=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../layouts/components/ChatAside/index.vue | 54 +++++++++++++++++-- 1 file changed, 50 insertions(+), 4 deletions(-) diff --git a/Yi.Ai.Vue3/src/layouts/components/ChatAside/index.vue b/Yi.Ai.Vue3/src/layouts/components/ChatAside/index.vue index 698d40f7..8091757a 100644 --- a/Yi.Ai.Vue3/src/layouts/components/ChatAside/index.vue +++ b/Yi.Ai.Vue3/src/layouts/components/ChatAside/index.vue @@ -33,7 +33,8 @@ onMounted(() => { const currentSessionRes = await get_session(`${sessionId.value}`); sessionStore.setCurrentSession(currentSessionRes.data); } - } finally { + } + finally { isLoading.value = false; } }; @@ -41,7 +42,8 @@ onMounted(() => { // 优先使用 requestIdleCallback,如果不支持则使用 setTimeout if (typeof requestIdleCallback !== 'undefined') { requestIdleCallback(() => loadData(), { timeout: 1000 }); - } else { + } + else { setTimeout(loadData, 100); } }); @@ -556,8 +558,9 @@ function toggleSidebar() { .collapsed-menu-trigger { position: absolute; - bottom: 4px; - right: 4px; + top: 50%; + right: 2px; + transform: translateY(-50%); width: 20px; height: 20px; border-radius: 50%; @@ -593,6 +596,9 @@ function toggleSidebar() { min-width: 0; .conversation-info { + display: flex; + flex-direction: column; + justify-content: center; flex: 1; min-width: 0; margin-right: 8px; @@ -660,14 +666,24 @@ function toggleSidebar() { align-items: center !important; } + & { + display: flex !important; + align-items: center !important; + } + &-content { flex: 1 !important; min-width: 0 !important; max-width: calc(100% - 32px) !important; + width: 100% !important; overflow: hidden !important; box-sizing: border-box !important; } + .conversation-content { + width: 100% !important; + } + // 确保操作按钮区域在展开状态下正常显示 &-actions { flex-shrink: 0 !important; @@ -722,6 +738,36 @@ function toggleSidebar() { &-content { max-width: 100% !important; } + + .conversation-info { + display: flex; + flex-direction: column; + justify-content: center; + height: 100%; + padding: 0 36px; + + .conversation-title { + font-size: 14px; + font-weight: 500; + color: var(--el-text-color-primary); + line-height: 1.4; + margin-bottom: 4px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + max-width: 100%; + } + + .conversation-preview { + font-size: 12px; + color: var(--el-text-color-secondary); + line-height: 1.4; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + max-width: 100%; + } + } } }