20261008173212

This commit is contained in:
oneao committed 2026-10-08 17:32:12 +08:00
1 parent ac65b75c73
commit f572dce2f6
48 files changed
+1698 -507

No files matched your search

+9
View File
@@ -0,0 +1,9 @@
export default defineAppConfig({
// Docus 默认把「整棵导航树」渲染进侧边栏;设置 navigation.sub 后,
// 侧边栏只显示当前顶级板块的页面。
// 见 docus/app/composables/useSubNavigation.ts
// 注意:sub='aside' 本会在侧边栏顶部渲染板块切换,已被本地 DocsAsideLeftTop 覆盖为空。
navigation: {
sub: 'aside',
},
})
+5
View File
@@ -0,0 +1,5 @@
/**
* Docus 会把本文件追加进 Nuxt 的 css[](见 docus/modules/css.ts)。
* 这里只引入设计令牌的编译产物;不要在此引入 Tailwind(会被 Docus 判为重复引入并告警)。
*/
@import '@g3soft/tokens';
@@ -0,0 +1,31 @@
<script setup lang="ts">
// Docus 在 header 右上角渲染的占位组件,本地同名文件会覆盖 Layer 里的空实现。
// 两个文档区入口:图标 + 文字(窄屏只留图标),并按当前路由所属板块高亮。
const route = useRoute()
const sections = [
{ to: '/ui/usage/getting-started', prefix: '/ui', icon: 'i-lucide-component', label: 'UI 组件库' },
{ to: '/api/getting-started', prefix: '/api', icon: 'i-lucide-cable', label: '接口文档' },
]
function isSectionActive(prefix: string) {
return route.path === prefix || route.path.startsWith(`${prefix}/`)
}
</script>
<template>
<UButton
v-for="section in sections"
:key="section.prefix"
:to="section.to"
:icon="section.icon"
color="neutral"
variant="ghost"
:active="isSectionActive(section.prefix)"
active-color="primary"
active-variant="soft"
:aria-label="section.label"
>
<span class="hidden lg:inline">{{ section.label }}</span>
</UButton>
</template>
@@ -0,0 +1,8 @@
<template>
<!--
覆盖 Docus 的 DocsAsideLeftTop(默认在侧边栏顶部渲染板块切换)。
这里留空,详情页侧边栏就不再出现板块切换;板块改由右上角入口按钮切换。
navigation.sub='aside' 仍需保留,它负责「侧边栏只显示当前板块」的隔离行为。
-->
<div />
</template>