diff --git a/frontend/src/components/doc-content.vue b/frontend/src/components/doc-content.vue
index 2cb37e10..fcd66e6e 100644
--- a/frontend/src/components/doc-content.vue
+++ b/frontend/src/components/doc-content.vue
@@ -284,7 +284,6 @@ let loadingChunks = false;
let pendingRequestedPage: number | null = null;
let pendingChunksBeforeLoad = 0;
let doc = null;
-let down = ref()
let mdContentWrap = ref()
let url = ref('')
// 视图模式:chunks / merged / preview
@@ -1007,13 +1006,21 @@ const handleDetailsScroll = () => {
-
-
-
-
- {{ $t('knowledgeStages.traceBtn') }}
-
+
@@ -1027,35 +1034,26 @@ const handleDetailsScroll = () => {
+
+
+
{{ $t('knowledgeBase.urlSource') }}
-
-
-
{{ $t('knowledgeBase.documentTitle') }}
-
-
- {{ details.title }}
-
-
-

-
-
-
-
{{ $t('knowledgeBase.documentSummary') }}
@@ -1284,9 +1269,15 @@ const handleDetailsScroll = () => {
align-items: center;
gap: 8px;
min-width: 0;
+ width: 100%;
+ /* TDesign 抽屉的 X 关闭按钮浮在 header 右上角(约 16px 宽 + 16px 间距),
+ 给右侧留出空间,避免我们的图标按钮被 X 遮挡。 */
+ padding-right: 32px;
.header-title {
- flex: 1;
+ /* flex: 1 1 auto + min-width:0 让标题在标题超长时收缩出省略号,
+ 而不是把右侧 tag/操作按钮挤出 header。 */
+ flex: 1 1 auto;
min-width: 0;
font-size: 16px;
font-weight: 500;
@@ -1295,22 +1286,52 @@ const handleDetailsScroll = () => {
white-space: nowrap;
}
- .header-type-tag,
- .trace-entry-btn {
+ .header-type-tag {
flex-shrink: 0;
}
+
+ .header-actions {
+ display: flex;
+ align-items: center;
+ gap: 2px;
+ /* 关键:操作区永不收缩,标题再长也能完整看到图标 */
+ flex-shrink: 0;
+ flex-grow: 0;
+ }
+
+ .header-action-btn {
+ /* 28×28 文本按钮:无边框,与抽屉头部融为一体;hover 时浅灰背景,
+ 与右上角 X 关闭按钮的视觉风格一致。 */
+ width: 28px;
+ min-width: 28px;
+ height: 28px;
+ padding: 0;
+ flex-shrink: 0;
+ color: var(--td-text-color-secondary);
+ border-radius: 4px;
+ transition: background-color 0.15s ease, color 0.15s ease;
+
+ &:hover {
+ background: var(--td-bg-color-container-hover);
+ color: var(--td-text-color-primary);
+ }
+
+ :deep(.t-button__text) {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ }
+ }
}
-// 信息面板通用样式
+// 信息面板通用样式(仅 url_box 在用,file/manual 已合并到 header)
.info_panel {
display: flex;
flex-direction: column;
margin-bottom: 16px;
}
-.doc_box,
-.url_box,
-.manual_box {
+.url_box {
.info_panel();
}
@@ -1341,39 +1362,6 @@ const handleDetailsScroll = () => {
min-width: 0;
}
-.kp-drawer-resize-handle {
- position: absolute;
- top: 0;
- left: -6px;
- bottom: 0;
- width: 12px;
- cursor: col-resize;
- z-index: 20;
- display: flex;
- align-items: center;
- justify-content: center;
-
- &:hover .kp-drawer-resize-line,
- .kp-drawer-shell--resizing & .kp-drawer-resize-line {
- opacity: 1;
- background: var(--td-brand-color);
- }
-}
-
-.kp-drawer-resize-line {
- width: 2px;
- height: 48px;
- border-radius: 1px;
- background: var(--td-component-border);
- opacity: 0.55;
- transition: opacity 0.15s ease, background 0.15s ease;
-}
-
-.kp-drawer-shell--resizing .kp-drawer-resize-line {
- opacity: 1;
- background: var(--td-brand-color);
-}
-
.kp-drawer-shell> :deep(.kp-timeline) {
width: 100%;
height: 100%;
@@ -1471,38 +1459,6 @@ const handleDetailsScroll = () => {
margin-bottom: 8px;
}
-// 文件下载区域
-.download_box {
- display: flex;
- align-items: center;
- background: var(--td-bg-color-container-hover);
- border-radius: 4px;
- padding: 6px 10px;
-}
-
-.doc_t {
- display: flex;
- align-items: center;
- word-break: break-all;
- font-size: 13px;
- color: var(--td-text-color-primary);
- flex: 1;
-}
-
-.icon_box {
- margin-left: 12px;
- display: flex;
- align-items: center;
- justify-content: center;
- color: var(--td-brand-color);
- cursor: pointer;
-
- img.download_box {
- width: 16px;
- height: 16px;
- }
-}
-
// URL链接区域
.url_link_box {
border-radius: 4px;
@@ -1529,19 +1485,6 @@ const handleDetailsScroll = () => {
}
}
-// 手动创建标题区域
-.manual_title_box {
- flex: 1;
- display: flex;
- align-items: center;
-
- .manual_title {
- color: var(--td-text-color-primary);
- font-size: 13px;
- word-break: break-word;
- }
-}
-
.content_header {
margin-top: 16px;
margin-bottom: 16px;
@@ -1840,6 +1783,41 @@ const handleDetailsScroll = () => {
transition: none !important;
}
+/* Trace 二级抽屉拖拽手柄:与主抽屉保持一致,teleport 到 body,
+ position: fixed,z-index 高于二级抽屉本体,避免被其他层级遮挡。 */
+.trace-drawer-resize-handle {
+ position: fixed;
+ top: 0;
+ bottom: 0;
+ width: 12px;
+ margin-left: -6px;
+ cursor: col-resize;
+ z-index: 2101;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+}
+
+.trace-drawer-resize-handle .trace-drawer-resize-line {
+ width: 2px;
+ height: 48px;
+ border-radius: 1px;
+ background: var(--td-component-border);
+ opacity: 0.55;
+ transition: opacity 0.15s ease, background 0.15s ease;
+}
+
+.trace-drawer-resize-handle:hover .trace-drawer-resize-line {
+ opacity: 1;
+ background: var(--td-brand-color);
+}
+
+.t-drawer.kp-secondary-drawer--resizing .trace-drawer-resize-line,
+body:has(.t-drawer.kp-secondary-drawer--resizing) .trace-drawer-resize-line {
+ opacity: 1;
+ background: var(--td-brand-color);
+}
+
.t-drawer.kp-secondary-drawer .t-drawer__body {
padding: 0 !important;
}