From e609bd2c4cc05ccada75725a3046b4cce9b23cf2 Mon Sep 17 00:00:00 2001 From: wizardchen Date: Mon, 16 Mar 2026 18:29:59 +0800 Subject: [PATCH] fix: fix manual download button layout and polish Co-Authored-By: Claude Sonnet 4.6 --- frontend/src/components/doc-content.vue | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/frontend/src/components/doc-content.vue b/frontend/src/components/doc-content.vue index 31f88ada..21322575 100644 --- a/frontend/src/components/doc-content.vue +++ b/frontend/src/components/doc-content.vue @@ -627,7 +627,9 @@ const downloadFile = () => { const link = document.createElement("a"); link.style.display = "none"; link.setAttribute("href", url.value); - link.setAttribute("download", props.details.type === 'manual' ? props.details.title + '.md' : props.details.title); + const needsExt = props.details.type === 'manual' && !props.details.title.toLowerCase().endsWith('.md'); + const ext = needsExt ? '.md' : ''; + link.setAttribute("download", props.details.title + ext); document.body.appendChild(link); link.click(); nextTick(() => { @@ -695,11 +697,13 @@ const handleDetailsScroll = () => {
{{ $t('knowledgeBase.documentTitle') }} -
- {{ details.title }} -
-
- +
+
+ {{ details.title }} +
+
+ +