Skip to content

Open-source LLM knowledge platform: turn raw documents into a queryable RAG, an autonomous reasoning agent, and a self-maintaining Wiki.

feat(ui): enhance styling and layout consistency across components

wizardchend3324d459244
diff --git a/frontend/src/components/ListSpaceSidebar.vue b/frontend/src/components/ListSpaceSidebar.vue
index 7271a04b4..cb88110d8 100644
--- a/frontend/src/components/ListSpaceSidebar.vue
+++ b/frontend/src/components/ListSpaceSidebar.vue
@@ -132,12 +132,13 @@ onMounted(() => {
</script>
<style scoped lang="less">
-// 左侧筛选栏,与主内容区协调、不抢戏
+// 筛选区:白底卡片感(与右侧内容区风格对调),细分界保持统一
.list-space-sidebar {
width: 200px;
flex-shrink: 0;
- background: #fafbfc;
+ background: #fff;
border-right: 1px solid #e7ebf0;
+ box-shadow: 2px 0 8px rgba(0, 0, 0, 0.04);
padding: 16px;
display: flex;
flex-direction: column;
@@ -221,30 +222,37 @@ onMounted(() => {
min-height: 0;
overflow-y: auto;
overflow-x: hidden;
+ scrollbar-width: none;
+
+ &::-webkit-scrollbar {
+ display: none;
+ }
}
.sidebar-item {
display: flex;
align-items: center;
justify-content: space-between;
- padding: 8px 10px;
+ padding: 9px 12px;
border-radius: 6px;
- color: #4e5969;
+ color: #2d3139;
cursor: pointer;
transition: all 0.2s ease;
- font-size: 13px;
+ font-family: "PingFang SC", -apple-system, BlinkMacSystemFont, sans-serif;
+ font-size: 14px;
+ -webkit-font-smoothing: antialiased;
.item-left {
display: flex;
align-items: center;
- gap: 6px;
+ gap: 8px;
min-width: 0;
flex: 1;
}
.item-icon {
flex-shrink: 0;
- color: #86909c;
+ color: #5c6470;
font-size: 14px;
transition: color 0.2s ease;
}
@@ -259,32 +267,36 @@ onMounted(() => {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
- font-weight: 400;
+ font-family: "PingFang SC", -apple-system, BlinkMacSystemFont, sans-serif;
+ font-size: 14px;
+ font-weight: 450;
+ line-height: 1.4;
+ letter-spacing: 0.01em;
}
.item-count {
font-size: 12px;
- color: #86909c;
+ color: #5c6470;
font-weight: 500;
- padding: 3px 6px;
+ padding: 3px 7px;
border-radius: 8px;
- background: #f7f9fc;
+ background: #eef0f3;
margin-left: 6px;
flex-shrink: 0;
transition: all 0.2s ease;
}
&:hover {
- background: #f7f9fc;
+ background: #f2f4f7;
color: #1d2129;
.item-icon {
- color: #4e5969;
+ color: #1d2129;
}
.item-count {
background: #e5e9f2;
- color: #4e5969;
+ color: #1d2129;
}
}
@@ -297,6 +309,10 @@ onMounted(() => {
color: #07c05f;
}
+ .item-label {
+ font-weight: 500;
+ }
+
.item-count {
background: #b8f0d3;
color: #07c05f;
diff --git a/frontend/src/components/menu.vue b/frontend/src/components/menu.vue
index b98508ff8..ab664b0ab 100644
--- a/frontend/src/components/menu.vue
+++ b/frontend/src/components/menu.vue
@@ -550,6 +550,9 @@ const mouseleaveMenu = (path: string) => {
overflow: hidden;
display: flex;
flex-direction: column;
+ /* 与右侧内容区统一的细分界,减少割裂感 */
+ border-right: 1px solid #e7ebf0;
+ box-shadow: 1px 0 0 rgba(0, 0, 0, 0.02);
.logo_box {
height: 80px;
diff --git a/frontend/src/views/agent/AgentList.vue b/frontend/src/views/agent/AgentList.vue
index 78a681707..8c9ac5754 100644
--- a/frontend/src/views/agent/AgentList.vue
+++ b/frontend/src/views/agent/AgentList.vue
@@ -573,6 +573,7 @@ const sharedAgentsByOrg = computed(() => {
return sharedAgents.value.filter(s => s.organization_id === orgId)
})
+// 各空间下的共享智能体数量(用于侧栏展示,含 0 的也显示)
const sharedCountByOrg = computed<Record<string, number>>(() => {
const map: Record<string, number> = {}
sharedAgents.value.forEach(s => {
@@ -580,6 +581,9 @@ const sharedCountByOrg = computed<Record<string, number>>(() => {
if (!id) return
map[id] = (map[id] || 0) + 1
})
+ ;(orgStore.organizations || []).forEach(org => {
+ if (map[org.id] === undefined) map[org.id] = 0
+ })
return map
})
@@ -875,7 +879,7 @@ defineExpose({
<style scoped lang="less">
.agent-list-container {
padding: 24px 32px;
- margin: 0 16px;
+ margin: 0 16px 0 4px;
height: calc(100vh);
box-sizing: border-box;
flex: 1;
@@ -888,7 +892,7 @@ defineExpose({
display: flex;
flex: 1;
min-height: 0;
- background: #fff;
+ background: #fafbfc;
border: 1px solid #e7ebf0;
border-radius: 10px;
overflow: hidden;
@@ -900,6 +904,7 @@ defineExpose({
overflow-y: auto;
overflow-x: hidden;
padding: 12px;
+ background: #fafbfc;
}
.header {
diff --git a/frontend/src/views/knowledge/KnowledgeBase.vue b/frontend/src/views/knowledge/KnowledgeBase.vue
index a8e5a1f88..cb351cd43 100644
--- a/frontend/src/views/knowledge/KnowledgeBase.vue
+++ b/frontend/src/views/knowledge/KnowledgeBase.vue
@@ -1753,8 +1753,8 @@ async function createNewSession(value: string): Promise<void> {
.knowledge-layout {
display: flex;
flex-direction: column;
- margin: 0 16px;
- gap: 16px;
+ margin: 0 16px 0 4px;
+ gap: 20px;
height: 100%;
flex: 1;
width: 100%;
@@ -1763,22 +1763,23 @@ async function createNewSession(value: string): Promise<void> {
box-sizing: border-box;
}
-// 与列表页一致:整体一块白底圆角区,左侧标签栏为内部分区
+// 与列表页一致:浅灰底圆角区,左侧筛选为白底卡片
.knowledge-main {
display: flex;
flex: 1;
min-height: 0;
- background: #fff;
+ background: #fafbfc;
border: 1px solid #e7ebf0;
border-radius: 10px;
overflow: hidden;
}
-// 与列表页左侧筛选栏协调:宽度、内边距、项间距
+// 与列表页筛选区一致:白底卡片感、细分界
.tag-sidebar {
width: 200px;
- background: #fafbfc;
+ background: #fff;
border-right: 1px solid #e7ebf0;
+ box-shadow: 2px 0 8px rgba(0, 0, 0, 0.04);
padding: 16px;
display: flex;
flex-direction: column;
@@ -1856,6 +1857,12 @@ async function createNewSession(value: string): Promise<void> {
flex: 1;
min-height: 0;
overflow-y: auto;
+ overflow-x: hidden;
+ scrollbar-width: none;
+
+ &::-webkit-scrollbar {
+ display: none;
+ }
.tag-load-more {
padding: 8px 0 0;
@@ -1873,23 +1880,25 @@ async function createNewSession(value: string): Promise<void> {
display: flex;
align-items: center;
justify-content: space-between;
- padding: 8px 10px;
+ padding: 9px 12px;
border-radius: 6px;
- color: #4e5969;
+ color: #2d3139;
cursor: pointer;
transition: all 0.2s ease;
- font-size: 13px;
+ font-family: "PingFang SC", -apple-system, BlinkMacSystemFont, sans-serif;
+ font-size: 14px;
+ -webkit-font-smoothing: antialiased;
.tag-list-left {
display: flex;
align-items: center;
- gap: 6px;
+ gap: 8px;
min-width: 0;
flex: 1;
.t-icon {
flex-shrink: 0;
- color: #86909c;
+ color: #5c6470;
font-size: 14px;
transition: color 0.2s ease;
}
@@ -1901,6 +1910,11 @@ async function createNewSession(value: string): Promise<void> {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
+ font-family: "PingFang SC", -apple-system, BlinkMacSystemFont, sans-serif;
+ font-size: 14px;
+ font-weight: 450;
+ line-height: 1.4;
+ letter-spacing: 0.01em;
}
.tag-list-right {
@@ -1913,43 +1927,47 @@ async function createNewSession(value: string): Promise<void> {
.tag-count {
font-size: 12px;
- color: #86909c;
+ color: #5c6470;
font-weight: 500;
min-width: 28px;
- padding: 3px 6px;
+ padding: 3px 7px;
border-radius: 8px;
- background: #f7f9fc;
+ background: #eef0f3;
transition: all 0.2s ease;
text-align: center;
box-sizing: border-box;
}
&:hover {
- background: #f7f9fc;
+ background: #f2f4f7;
color: #1d2129;
.tag-list-left .t-icon {
- color: #4e5969;
+ color: #1d2129;
}
.tag-count {
background: #e5e9f2;
- color: #4e5969;
+ color: #1d2129;
}
}
&.active {
background: #e6f7ec;
- color: #00a870;
+ color: #07c05f;
font-weight: 500;
.tag-list-left .t-icon {
- color: #00a870;
+ color: #07c05f;
+ }
+
+ .tag-name {
+ font-weight: 500;
}
.tag-count {
background: #b8f0d3;
- color: #00a870;
+ color: #07c05f;
font-weight: 600;
}
}
@@ -2138,6 +2156,7 @@ async function createNewSession(value: string): Promise<void> {
min-height: 0;
padding: 12px;
overflow: hidden;
+ background: #fafbfc;
}
.doc-card-area {
@@ -2439,7 +2458,7 @@ async function createNewSession(value: string): Promise<void> {
flex: 1;
padding: 24px 32px;
overflow-y: auto;
- margin: 0 16px;
+ margin: 0 16px 0 4px;
}
@media (max-width: 1250px) and (min-width: 1045px) {
diff --git a/frontend/src/views/knowledge/KnowledgeBaseList.vue b/frontend/src/views/knowledge/KnowledgeBaseList.vue
index 0fc48d8b2..4d3f10c38 100644
--- a/frontend/src/views/knowledge/KnowledgeBaseList.vue
+++ b/frontend/src/views/knowledge/KnowledgeBaseList.vue
@@ -593,7 +593,7 @@ const sharedKbsByOrg = computed(() => {
return sharedKbs.value.filter(s => s.organization_id === orgId)
})
-// 各空间下的共享知识库数量(用于侧栏展示)
+// 各空间下的共享知识库数量(用于侧栏展示,含 0 的也显示)
const sharedCountByOrg = computed<Record<string, number>>(() => {
const map: Record<string, number> = {}
sharedKbs.value.forEach(s => {
@@ -601,6 +601,9 @@ const sharedCountByOrg = computed<Record<string, number>>(() => {
if (!id) return
map[id] = (map[id] || 0) + 1
})
+ ;(orgStore.organizations || []).forEach(org => {
+ if (map[org.id] === undefined) map[org.id] = 0
+ })
return map
})
@@ -1031,7 +1034,7 @@ const handleUploadFinishedEvent = (event: Event) => {
<style scoped lang="less">
.kb-list-container {
padding: 24px 32px;
- margin: 0 16px;
+ margin: 0 16px 0 4px;
height: calc(100vh);
box-sizing: border-box;
flex: 1;
@@ -1077,7 +1080,7 @@ const handleUploadFinishedEvent = (event: Event) => {
display: flex;
flex: 1;
min-height: 0;
- background: #fff;
+ background: #fafbfc;
border: 1px solid #e7ebf0;
border-radius: 10px;
overflow: hidden;
@@ -1089,6 +1092,7 @@ const handleUploadFinishedEvent = (event: Event) => {
overflow-y: auto;
overflow-x: hidden;
padding: 12px;
+ background: #fafbfc;
}
.header-subtitle {
diff --git a/frontend/src/views/knowledge/components/FAQEntryManager.vue b/frontend/src/views/knowledge/components/FAQEntryManager.vue
index 7ae64431f..bafe554f4 100644
--- a/frontend/src/views/knowledge/components/FAQEntryManager.vue
+++ b/frontend/src/views/knowledge/components/FAQEntryManager.vue
@@ -3323,24 +3323,26 @@ watch(() => entries.value.map(e => ({
display: flex;
flex-direction: column;
min-height: 0;
+ gap: 20px;
}
-// 与列表页一致:整体一块白底圆角区,左侧标签栏为内部分区
+// 与列表页一致:浅灰底圆角区,左侧筛选为白底卡片
.faq-main {
display: flex;
flex: 1;
min-height: 0;
- background: #fff;
+ background: #fafbfc;
border: 1px solid #e7ebf0;
border-radius: 10px;
overflow: hidden;
}
-// 与列表页左侧筛选栏、文档型知识库文档分类协调
+// 与列表页筛选区、文档型知识库标签栏一致:白底卡片感
.faq-tag-panel {
width: 200px;
- background: #fafbfc;
+ background: #fff;
border-right: 1px solid #e7ebf0;
+ box-shadow: 2px 0 8px rgba(0, 0, 0, 0.04);
padding: 16px;
flex-shrink: 0;
display: flex;
@@ -3453,6 +3455,11 @@ watch(() => entries.value.map(e => ({
min-height: 0;
overflow-y: auto;
overflow-x: hidden;
+ scrollbar-width: none;
+
+ &::-webkit-scrollbar {
+ display: none;
+ }
.tag-loading-more {
padding: 8px 0;
@@ -3465,23 +3472,25 @@ watch(() => entries.value.map(e => ({
display: flex;
align-items: center;
justify-content: space-between;
- padding: 8px 10px;
+ padding: 9px 12px;
border-radius: 6px;
- color: #4e5969;
+ color: #2d3139;
cursor: pointer;
transition: all 0.2s ease;
- font-size: 13px;
+ font-family: "PingFang SC", -apple-system, BlinkMacSystemFont, sans-serif;
+ font-size: 14px;
+ -webkit-font-smoothing: antialiased;
.faq-tag-left {
display: flex;
align-items: center;
- gap: 6px;
+ gap: 8px;
min-width: 0;
flex: 1;
.t-icon {
flex-shrink: 0;
- color: #86909c;
+ color: #5c6470;
font-size: 14px;
transition: color 0.2s ease;
}
@@ -3493,7 +3502,11 @@ watch(() => entries.value.map(e => ({
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
- font-weight: 400;
+ font-family: "PingFang SC", -apple-system, BlinkMacSystemFont, sans-serif;
+ font-size: 14px;
+ font-weight: 450;
+ line-height: 1.4;
+ letter-spacing: 0.01em;
}
.faq-tag-right {
@@ -3506,43 +3519,47 @@ watch(() => entries.value.map(e => ({
.faq-tag-count {
font-size: 12px;
- color: #86909c;
+ color: #5c6470;
font-weight: 500;
min-width: 28px;
- padding: 3px 6px;
+ padding: 3px 7px;
border-radius: 8px;
- background: #f7f9fc;
+ background: #eef0f3;
transition: all 0.2s ease;
text-align: center;
box-sizing: border-box;
}
&:hover {
- background: #f7f9fc;
+ background: #f2f4f7;
color: #1d2129;
.faq-tag-left .t-icon {
- color: #4e5969;
+ color: #1d2129;
}
.faq-tag-count {
background: #e5e9f2;
- color: #4e5969;
+ color: #1d2129;
}
}
&.active {
background: #e6f7ec;
- color: #00a870;
+ color: #07c05f;
font-weight: 500;
.faq-tag-left .t-icon {
- color: #00a870;
+ color: #07c05f;
+ }
+
+ .tag-name {
+ font-weight: 500;
}
.faq-tag-count {
background: #b8f0d3;
- color: #00a870;
+ color: #07c05f;
font-weight: 600;
}
@@ -3698,6 +3715,7 @@ watch(() => entries.value.map(e => ({
flex-direction: column;
padding: 12px;
overflow: hidden;
+ background: #fafbfc;
}
.faq-search-bar {
@@ -3793,7 +3811,6 @@ watch(() => entries.value.map(e => ({
justify-content: space-between;
flex-wrap: wrap;
gap: 12px;
- margin-bottom: 20px;
flex-shrink: 0;
.faq-header-title {
diff --git a/frontend/src/views/organization/OrganizationList.vue b/frontend/src/views/organization/OrganizationList.vue
index af9dd133b..8ec2d52a4 100644
--- a/frontend/src/views/organization/OrganizationList.vue
+++ b/frontend/src/views/organization/OrganizationList.vue
@@ -1202,7 +1202,7 @@ onUnmounted(() => {
<style scoped lang="less">
.org-list-container {
padding: 24px 32px;
- margin: 0 16px;
+ margin: 0 16px 0 4px;
height: calc(100vh);
box-sizing: border-box;
flex: 1;
@@ -1215,7 +1215,7 @@ onUnmounted(() => {
display: flex;
flex: 1;
min-height: 0;
- background: #fff;
+ background: #fafbfc;
border: 1px solid #e7ebf0;
border-radius: 10px;
overflow: hidden;
@@ -1227,26 +1227,27 @@ onUnmounted(() => {
overflow-y: auto;
overflow-x: hidden;
padding: 12px;
+ background: #fafbfc;
}
.header {
display: flex;
align-items: center;
margin-bottom: 20px;
+ flex-shrink: 0;
.header-title {
display: flex;
flex-direction: column;
- gap: 6px;
+ gap: 4px;
}
h2 {
margin: 0;
- color: #0f172a;
+ color: #000000e6;
font-family: "PingFang SC", system-ui, sans-serif;
font-size: 24px;
font-weight: 600;
- letter-spacing: -0.02em;
line-height: 32px;
}
}
diff --git a/frontend/src/views/platform/index.vue b/frontend/src/views/platform/index.vue
index ab2e9ad72..065780778 100644
--- a/frontend/src/views/platform/index.vue
+++ b/frontend/src/views/platform/index.vue
@@ -135,6 +135,8 @@ onUnmounted(() => {
width: 100%;
height: 100%;
min-width: 600px;
+ /* 统一整页背景,让左侧菜单与右侧内容区视觉连贯 */
+ background: #fafbfc;
}
.upload-mask {