mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-15 20:48:12 +01:00
Co-authored-by: hywax <me@hywax.space> Co-authored-by: Benjamin Canac <canacb1@gmail.com> Co-authored-by: Sébastien Chopin <atinux@gmail.com> Co-authored-by: Sébastien Chopin <seb@nuxt.com>
34 lines
873 B
Vue
34 lines
873 B
Vue
<script setup lang="ts">
|
|
import type { TreeItem } from '@nuxt/ui'
|
|
|
|
const items: TreeItem[] = [
|
|
{
|
|
label: 'app/',
|
|
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' }
|
|
]
|
|
|
|
const value = ref(items[items.length - 1])
|
|
</script>
|
|
|
|
<template>
|
|
<UTree v-model="value" :items="items" />
|
|
</template>
|