mirror of
https://gitee.com/ccnetcore/Yi
synced 2026-03-03 00:00:58 +08:00
fix: 对话选中状态增强
This commit is contained in:
@@ -33,7 +33,8 @@ onMounted(() => {
|
|||||||
const currentSessionRes = await get_session(`${sessionId.value}`);
|
const currentSessionRes = await get_session(`${sessionId.value}`);
|
||||||
sessionStore.setCurrentSession(currentSessionRes.data);
|
sessionStore.setCurrentSession(currentSessionRes.data);
|
||||||
}
|
}
|
||||||
} finally {
|
}
|
||||||
|
finally {
|
||||||
isLoading.value = false;
|
isLoading.value = false;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -41,7 +42,8 @@ onMounted(() => {
|
|||||||
// 优先使用 requestIdleCallback,如果不支持则使用 setTimeout
|
// 优先使用 requestIdleCallback,如果不支持则使用 setTimeout
|
||||||
if (typeof requestIdleCallback !== 'undefined') {
|
if (typeof requestIdleCallback !== 'undefined') {
|
||||||
requestIdleCallback(() => loadData(), { timeout: 1000 });
|
requestIdleCallback(() => loadData(), { timeout: 1000 });
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
setTimeout(loadData, 100);
|
setTimeout(loadData, 100);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -556,8 +558,9 @@ function toggleSidebar() {
|
|||||||
|
|
||||||
.collapsed-menu-trigger {
|
.collapsed-menu-trigger {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 4px;
|
top: 50%;
|
||||||
right: 4px;
|
right: 2px;
|
||||||
|
transform: translateY(-50%);
|
||||||
width: 20px;
|
width: 20px;
|
||||||
height: 20px;
|
height: 20px;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
@@ -593,6 +596,9 @@ function toggleSidebar() {
|
|||||||
min-width: 0;
|
min-width: 0;
|
||||||
|
|
||||||
.conversation-info {
|
.conversation-info {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
margin-right: 8px;
|
margin-right: 8px;
|
||||||
@@ -660,14 +666,24 @@ function toggleSidebar() {
|
|||||||
align-items: center !important;
|
align-items: center !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
& {
|
||||||
|
display: flex !important;
|
||||||
|
align-items: center !important;
|
||||||
|
}
|
||||||
|
|
||||||
&-content {
|
&-content {
|
||||||
flex: 1 !important;
|
flex: 1 !important;
|
||||||
min-width: 0 !important;
|
min-width: 0 !important;
|
||||||
max-width: calc(100% - 32px) !important;
|
max-width: calc(100% - 32px) !important;
|
||||||
|
width: 100% !important;
|
||||||
overflow: hidden !important;
|
overflow: hidden !important;
|
||||||
box-sizing: border-box !important;
|
box-sizing: border-box !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.conversation-content {
|
||||||
|
width: 100% !important;
|
||||||
|
}
|
||||||
|
|
||||||
// 确保操作按钮区域在展开状态下正常显示
|
// 确保操作按钮区域在展开状态下正常显示
|
||||||
&-actions {
|
&-actions {
|
||||||
flex-shrink: 0 !important;
|
flex-shrink: 0 !important;
|
||||||
@@ -722,6 +738,36 @@ function toggleSidebar() {
|
|||||||
&-content {
|
&-content {
|
||||||
max-width: 100% !important;
|
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%;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user