From 625b40b18457295eb036bb1a19e3476708584aa4 Mon Sep 17 00:00:00 2001 From: wizardchen Date: Thu, 6 Nov 2025 21:44:12 +0800 Subject: [PATCH] feat: Add API documentation and external links to User Menu - Introduced new menu items for accessing API documentation, the official website, and GitHub repository. - Implemented corresponding methods to open these links in a new tab. - Removed the previous API documentation card from TenantInfo.vue to streamline the UI. --- frontend/src/components/UserMenu.vue | 31 +++++++++++ frontend/src/views/tenant/TenantInfo.vue | 70 ------------------------ 2 files changed, 31 insertions(+), 70 deletions(-) diff --git a/frontend/src/components/UserMenu.vue b/frontend/src/components/UserMenu.vue index 913b27c7..27eb9c7b 100644 --- a/frontend/src/components/UserMenu.vue +++ b/frontend/src/components/UserMenu.vue @@ -34,6 +34,19 @@ 全部设置 + + + + - - - - -
-

使用您的 API Key 开始开发,查看完整的 API 文档和示例代码。

- - - - 查看 API 文档 - - - -
-
@@ -267,10 +245,6 @@ const copyApiKey = async () => { } } -const openApiDoc = () => { - window.open('https://github.com/Tencent/WeKnora/blob/main/docs/API.md', '_blank') -} - const getStatusText = (status: string | undefined) => { switch (status) { case 'active': @@ -420,39 +394,6 @@ onMounted(() => { } } -.doc-description { - margin-bottom: 16px; - color: #666666; - font-size: 14px; -} - -.doc-actions { - margin-bottom: 20px; -} - -.api-example { - margin-top: 20px; - padding: 16px; - background-color: #f8f9fa; - border-radius: 6px; - - .example-header h4 { - margin: 0 0 16px 0; - font-size: 16px; - font-weight: 600; - color: #000000; - } - - .code-textarea { - margin-bottom: 16px; - font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace; - } - - .example-note { - margin-top: 16px; - } -} - .loading-container { display: flex; flex-direction: column; @@ -496,17 +437,6 @@ onMounted(() => { font-size: 12px; margin-left: 8px; } - - .doc-actions { - :deep(.t-space) { - flex-direction: column; - width: 100%; - - .t-button { - width: 100%; - } - } - } } /* 覆盖TDesign组件样式 */