feat(docs): align documentation shell with HeroUI baseline
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
<script setup lang="ts">
|
||||
import { Link } from "@heroui-vue/components";
|
||||
import { withBase } from "vitepress";
|
||||
import type { DocsGroup } from "./navigation";
|
||||
defineProps<{ groups: DocsGroup[]; current: string; label?: string }>();
|
||||
const emit = defineEmits<{ navigate: [] }>();
|
||||
</script>
|
||||
<template>
|
||||
<nav :aria-label="label ?? '文档导航'" class="sidebar-tree">
|
||||
<section v-for="group in groups" :key="group.title">
|
||||
<h2>{{ group.title }}</h2>
|
||||
<Link
|
||||
v-for="item in group.items"
|
||||
:key="item.url"
|
||||
:href="withBase(item.url)"
|
||||
:aria-current="current === item.url ? 'page' : undefined"
|
||||
@click="emit('navigate')"
|
||||
>
|
||||
{{ item.title }}
|
||||
</Link>
|
||||
</section>
|
||||
</nav>
|
||||
</template>
|
||||
Reference in New Issue
Block a user