Docs page

This commit is contained in:
2024-09-28 00:28:40 +08:00
parent 729b7f3c00
commit 7e3c3a1679
8 changed files with 275 additions and 0 deletions

View File

@ -0,0 +1,14 @@
<template>
<v-list-item :active="route.hash.replace('#', '') == link.id" :to="{ hash: '#'+link.id }">
<template #prepend>
<v-icon icon="mdi-menu-right" :style="`padding-left: ${props.padding ?? 0}rem`" />
</template>
{{ link.text }}
</v-list-item>
</template>
<script setup lang="ts">
const props = defineProps<{ link: any, padding?: number }>()
const route = useRoute()
</script>

View File

@ -0,0 +1,11 @@
<template>
<template v-for="link in links">
<docs-table-of-content-link :link="link" :padding="props.padding" />
<table-of-content-links v-if="link.children" :links="link.children" :padding="(props.padding ?? 0) + 2" />
</template>
</template>
<script setup lang="ts">
const props = defineProps<{ links: any[], padding?: number }>()
</script>

View File

@ -0,0 +1,13 @@
<template>
<v-list density="compact" nav color="primary">
<template v-for="link in links">
<docs-table-of-content-link :link="link" :padding="props.padding" />
<docs-table-of-content-links v-if="link.children" :links="link.children" :padding="(props.padding ?? 0) + 2" />
</template>
</v-list>
</template>
<script setup lang="ts">
const props = defineProps<{ links: any[], padding?: number }>()
</script>