mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-28 19:00:35 +01:00
docs: fix after inject refactor
This commit is contained in:
@@ -1,14 +1,14 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
const commandPaletteRef = ref()
|
const commandPaletteRef = ref()
|
||||||
|
|
||||||
const navigation = inject('navigation')
|
const links = inject('links')
|
||||||
|
|
||||||
const { data: files } = await useLazyAsyncData('search', () => queryContent().where({ _type: 'markdown' }).find(), { default: () => [] })
|
const { data: files } = await useLazyAsyncData('search', () => queryContent().where({ _type: 'markdown' }).find(), { default: () => [] })
|
||||||
|
|
||||||
const groups = computed(() => navigation.value.map(item => ({
|
const groups = computed(() => links.value.map(item => ({
|
||||||
key: item._path,
|
key: item.to,
|
||||||
label: item.title,
|
label: item.label,
|
||||||
commands: files.value.filter(file => file._path.startsWith(item._path)).map(file => ({
|
commands: files.value.filter(file => file._path.startsWith(item.to)).map(file => ({
|
||||||
id: file._id,
|
id: file._id,
|
||||||
icon: 'i-heroicons-document',
|
icon: 'i-heroicons-document',
|
||||||
title: file.navigation?.title || file.title,
|
title: file.navigation?.title || file.title,
|
||||||
|
|||||||
Reference in New Issue
Block a user