style(database/agent): 调整字体大小和颜色,修改标题加载状态,增强用户界面体验。

This commit is contained in:
Wenjie Zhang 2025-07-23 12:54:36 +08:00
parent 9f596e55e7
commit 346b85836b
4 changed files with 52 additions and 36 deletions

View File

@ -500,20 +500,22 @@ const toggleToolCall = (toolCallId) => {
font-family: -apple-system, BlinkMacSystemFont, 'Noto Sans SC', 'PingFang SC', 'Noto Sans SC', 'Microsoft YaHei', 'Hiragino Sans GB', 'Source Han Sans CN', 'Courier New', monospace;
#preview-only-preview {
font-size: 15px;
color: var(--gray-900);
font-size: 1rem;
line-height: 1.75;
color: var(--gray-2000);
}
h1, h2 {
font-size: 16px;
font-size: 1.2rem;
}
h3, h4 {
font-size: 16px;
font-size: 1.1rem;
}
h5, h6 {
font-size: 15px;
font-size: 1rem;
}
strong {

View File

@ -666,7 +666,7 @@ const loadGraphData = async () => {
await initSigma()
}
message.success(`加载成功:${rawGraph.nodes.length} 个节点,${rawGraph.edges.length} 条边${graphResponse.data.is_truncated ? ' (已截断)' : ''}`)
// message.success(`${rawGraph.nodes.length} ${rawGraph.edges.length} ${graphResponse.data.is_truncated ? ' ()' : ''}`)
}
} catch (error) {
console.error('加载图数据失败:', error)

View File

@ -1,7 +1,7 @@
<template>
<div class="database-info-container">
<HeaderComponent
:title="database.name || '数据库信息'"
:title="database.name || '数据库信息加载中'"
:loading="state.databaseLoading"
>
<template #left>
@ -18,6 +18,7 @@
<div class="header-info">
<span class="db-id">ID: {{ database.db_id || 'N/A' }}</span>
<span class="file-count">{{ database.files ? Object.keys(database.files).length : 0 }} 文件</span>
<a-tag color="blue">{{ database.embed_info?.name }}</a-tag>
<a-tag
:color="getKbTypeColor(database.kb_type || 'lightrag')"
class="kb-type-tag"
@ -1556,9 +1557,13 @@ const getKbTypeColor = (type) => {
.header-info {
display: flex;
align-items: center;
gap: 10px;
gap: 8px;
margin-left: auto; /* Push to the right */
span {
margin: 0;
}
.kb-type-tag {
display: flex;
align-items: center;

View File

@ -345,34 +345,6 @@ onMounted(() => {
<style lang="less" scoped>
.new-database-modal {
.kb-type-option {
// padding: 4px 0;
.type-header {
display: flex;
align-items: center;
gap: 6px;
margin-bottom: 2px;
.type-icon {
width: 16px;
height: 16px;
color: var(--main-color);
flex-shrink: 0;
}
.type-title {
font-weight: 600;
}
}
.type-desc {
font-size: 12px;
color: var(--gray-600);
padding-left: 20px;
}
}
.kb-type-guide {
margin: 12px 0;
}
@ -538,3 +510,40 @@ onMounted(() => {
}
}
</style>
<!-- 为了解决ant-select下拉选项中图标和文本对齐问题需要使用非scoped样式 -->
<style lang="less">
/* 知识库类型选项样式 */
.kb-type-option {
.type-header {
display: flex;
align-items: center;
gap: 8px;
.type-icon {
width: 16px;
height: 16px;
flex-shrink: 0;
display: flex;
align-items: center;
justify-content: center;
}
.type-title {
font-weight: 500;
}
}
.type-desc {
font-size: 12px;
color: #666;
margin-left: 24px;
margin-top: 2px;
}
}
/* 确保选中项也正确对齐 */
.ant-select-selection-item .kb-type-option .type-header {
align-items: center;
}
</style>