- {{
- details.title.substring(0, details.title.lastIndexOf("."))
- }}
-
+
+
+
+
+
+
{{ $t('knowledgeBase.fileName') }}
@@ -152,17 +244,48 @@ const handleDetailsScroll = () => {
+
+
+
+
{{ $t('knowledgeBase.urlSource') || '来源网址' }}
+
+
+
+
+
+
{{ $t('knowledgeBase.documentTitle') || '文档标题' }}
+
+ {{ details.title }}
+
+
+
+
{{ $t('common.noData') }}
-
-
+
+
{{ $t('common.confirm') }}
{{ $t('common.cancel') }}
@@ -185,16 +308,24 @@ const handleDetailsScroll = () => {
padding: 16px 24px;
}
-.content {
- word-break: break-word;
- padding: 4px;
- gap: 4px;
- margin-top: 12px;
+.drawer-header {
+ display: flex;
+ align-items: center;
+ gap: 12px;
+
+ .header-title {
+ flex: 1;
+ font-weight: 600;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
}
-.doc_box {
+.doc_box, .url_box, .manual_box {
display: flex;
flex-direction: column;
+ margin-bottom: 16px;
}
.label {
@@ -206,6 +337,7 @@ const handleDetailsScroll = () => {
margin-bottom: 8px;
}
+// 文件下载区域
.download_box {
display: flex;
align-items: center;
@@ -238,13 +370,71 @@ const handleDetailsScroll = () => {
}
}
+// URL链接区域
+.url_link_box {
+ border-radius: 4px;
+ border: 1px solid #d0e8dc;
+ background: #f0fdf4;
+ padding: 8px 12px;
+
+ .url_link {
+ display: flex;
+ align-items: center;
+ gap: 8px;
+ color: #059669;
+ text-decoration: none;
+ transition: all 0.2s ease;
+
+ &:hover {
+ color: #07c05f;
+ background: #e6f7ed;
+ border-radius: 3px;
+ padding: 4px 6px;
+ margin: -4px -6px;
+
+ .jump-icon {
+ transform: translateX(2px);
+ }
+ }
+
+ .url_text {
+ flex: 1;
+ font-size: 13px;
+ word-break: break-all;
+ }
+
+ .jump-icon {
+ transition: transform 0.2s ease;
+ flex-shrink: 0;
+ color: #059669;
+ }
+ }
+}
+
+// 手动创建标题区域
+.manual_title_box {
+ border-radius: 4px;
+ border: 1px solid #dcdcdc;
+ background: #f0fdf4;
+ padding: 8px 12px;
+
+ .manual_title {
+ color: #1d2129;
+ font-size: 14px;
+ font-weight: 500;
+ word-break: break-word;
+ }
+}
+
.content_header {
margin-top: 22px;
- margin-bottom: 24px;
+ margin-bottom: 16px;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
}
.time {
- margin-left: 12px;
color: #00000066;
font-size: 12px;
font-style: normal;
@@ -258,5 +448,68 @@ const handleDetailsScroll = () => {
font-size: 12px;
padding: 16px;
background: #fbfbfb;
+ text-align: center;
+}
+
+// Chunk列表样式
+.chunk-list {
+ display: flex;
+ flex-direction: column;
+ gap: 12px;
+}
+
+.chunk-item {
+ border-radius: 6px;
+ padding: 12px;
+ transition: all 0.2s ease;
+ border: 1px solid transparent;
+
+ &.chunk-even {
+ background: #3032360f;
+ }
+
+ &.chunk-odd {
+ background: #07c05f0d;
+ }
+
+ &:hover {
+ border-color: #07c05f;
+ box-shadow: 0 2px 8px rgba(7, 192, 95, 0.1);
+ }
+}
+
+.chunk-header {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ margin-bottom: 8px;
+ padding-bottom: 6px;
+ border-bottom: 1px solid #e7e7e7;
+
+ .chunk-index {
+ color: #00000099;
+ font-size: 12px;
+ font-weight: 600;
+ letter-spacing: 0.5px;
+ }
+
+ .chunk-meta {
+ color: #00000066;
+ font-size: 11px;
+ }
+}
+
+.md-content {
+ word-break: break-word;
+ line-height: 1.6;
+ color: #1d2129;
+}
+
+// 保留旧样式作为兼容(已被chunk-item替代)
+.content {
+ word-break: break-word;
+ padding: 4px;
+ gap: 4px;
+ margin-top: 12px;
}
diff --git a/frontend/src/components/menu.vue b/frontend/src/components/menu.vue
index b41c8ce0..713ee5f2 100644
--- a/frontend/src/components/menu.vue
+++ b/frontend/src/components/menu.vue
@@ -32,6 +32,16 @@
{{ t('upload.uploadDocument') }}
+
+
+
+