diff --git a/frontend/src/pages/Document/DocumentPage.css b/frontend/src/pages/Document/DocumentPage.css index ffcf49d..ff425ea 100644 --- a/frontend/src/pages/Document/DocumentPage.css +++ b/frontend/src/pages/Document/DocumentPage.css @@ -178,6 +178,13 @@ flex-direction: column; } +.docs-toc-sider .ant-layout-sider-children { + display: flex; + flex-direction: column; + height: 100%; + min-height: 0; +} + .toc-header { padding: 16px; border-bottom: 1px solid var(--border-color); @@ -196,12 +203,15 @@ .toc-content { flex: 1; + min-height: 0; overflow-y: auto; overflow-x: auto; padding: 16px; } .toc-content .ant-anchor { + display: block; + min-height: max-content; padding-left: 0; padding-bottom: 65px; /* 给Anchor组件添加底部内边距,避免最后一项被遮挡 */ diff --git a/frontend/src/pages/Preview/PreviewPage.css b/frontend/src/pages/Preview/PreviewPage.css index 962a703..852169a 100644 --- a/frontend/src/pages/Preview/PreviewPage.css +++ b/frontend/src/pages/Preview/PreviewPage.css @@ -152,6 +152,13 @@ flex-direction: column; } +.preview-toc-sider .ant-layout-sider-children { + display: flex; + flex-direction: column; + height: 100%; + min-height: 0; +} + .toc-header { padding: 16px; border-bottom: 1px solid var(--border-color); @@ -170,13 +177,17 @@ .toc-content { flex: 1; + min-height: 0; overflow-y: auto; overflow-x: auto; padding: 16px; } .toc-content .ant-anchor { + display: block; + min-height: max-content; padding-left: 0; + padding-bottom: 65px; } .toc-content .ant-anchor-link {