mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-14 20:19:34 +01:00
41 lines
1015 B
Vue
41 lines
1015 B
Vue
<script setup lang="ts">
|
|
import type { TreeItem } from '@nuxt/ui'
|
|
|
|
const items = [
|
|
{
|
|
label: 'app/',
|
|
slot: 'app' as const,
|
|
defaultExpanded: true,
|
|
children: [
|
|
{
|
|
label: 'composables/',
|
|
children: [
|
|
{ label: 'useAuth.ts', icon: 'i-vscode-icons-file-type-typescript' },
|
|
{ label: 'useUser.ts', icon: 'i-vscode-icons-file-type-typescript' }
|
|
]
|
|
},
|
|
{
|
|
label: 'components/',
|
|
defaultExpanded: true,
|
|
children: [
|
|
{ label: 'Card.vue', icon: 'i-vscode-icons-file-type-vue' },
|
|
{ label: 'Button.vue', icon: 'i-vscode-icons-file-type-vue' }
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{ label: 'app.vue', icon: 'i-vscode-icons-file-type-vue' },
|
|
{ label: 'nuxt.config.ts', icon: 'i-vscode-icons-file-type-nuxt' }
|
|
] satisfies TreeItem[]
|
|
</script>
|
|
|
|
<template>
|
|
<UTree :items="items">
|
|
<template #app="{ item }">
|
|
<p class="italic font-bold">
|
|
{{ item.label }}
|
|
</p>
|
|
</template>
|
|
</UTree>
|
|
</template>
|