feat: add docs build action

This commit is contained in:
engigu
2026-03-10 20:12:07 +08:00
parent 6d61c18539
commit 96e792c979
27 changed files with 4111 additions and 4176 deletions
+5 -9
View File
@@ -22,8 +22,6 @@ import {
const { refreshSettings } = useSiteSettings()
const baseUrl = (window as any).__BASE_URL__ || ''
const form = ref<SiteSettings>({
title: '',
subtitle: '',
@@ -113,11 +111,7 @@ async function copyOpenapiToken() {
}
function openSwaggerDocs() {
if (!form.value.openapi_enabled) {
toast.error('必须先开启 OpenAPI 才能查看接口文档页面')
return
}
window.open(`${baseUrl}/openapi/index.html`, '_blank')
window.open('https://engigu.github.io/baihu-panel/guide/api.html', '_blank')
}
@@ -245,7 +239,8 @@ onMounted(loadSettings)
<div class="flex items-center gap-2">
<h3 class="text-lg font-medium text-foreground whitespace-nowrap">OpenAPI Token</h3>
<Badge variant="secondary"
class="font-normal text-xs bg-blue-500/10 text-blue-600 dark:text-blue-400 border-blue-500/20 whitespace-nowrap">推荐方式</Badge>
class="font-normal text-xs bg-blue-500/10 text-blue-600 dark:text-blue-400 border-blue-500/20 whitespace-nowrap">
推荐方式</Badge>
</div>
<div class="flex items-center justify-between sm:justify-end w-full sm:w-auto gap-4">
<a href="#" @click.prevent="openSwaggerDocs"
@@ -261,7 +256,8 @@ onMounted(loadSettings)
</div>
<p class="text-sm text-muted-foreground mb-4">开启全局 OpenAPI 直接访问能力配置后可通过请求头 <code
class="bg-muted px-1.5 py-0.5 rounded text-xs select-all font-sans">Authorization: Bearer &lt;在此生成的Token&gt;</code>
以第三方身份调用系统的所有接口请妥善保管 Token 并设置合理的有效期<span class="text-amber-600 dark:text-amber-500 font-medium ml-1">注意必须先开启本功能才能查看接口文档页面和对接调用</span></p>
以第三方身份调用系统的所有接口请妥善保管 Token 并设置合理的有效期<span
class="text-amber-600 dark:text-amber-500 font-medium ml-1">注意必须先开启本功能才能查看接口文档页面和对接调用</span></p>
<div class="grid grid-cols-1 sm:grid-cols-4 items-center gap-2 sm:gap-4 mb-4">
<Label class="sm:text-right text-muted-foreground">Token 密钥</Label>