fix: 对话选中状态增强

This commit is contained in:
Gsh
2026-02-14 22:00:09 +08:00
parent 717d5ba876
commit 962c0489a3

View File

@@ -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%;
}
}
}
}