feat(ContextMenu/DropdownMenu): handle loading field in items

This commit is contained in:
Benjamin Canac
2024-10-17 22:03:32 +02:00
parent 81a59969f6
commit b975235c8b
11 changed files with 76 additions and 20 deletions

View File

@@ -33,7 +33,8 @@ const groups = computed(() => [{
icon: 'i-heroicons-document-plus',
loading: loading.value,
onSelect(e: Event) {
e?.preventDefault()
e.preventDefault()
toast.add({ title: 'New file added!' })
loading.value = true
@@ -48,7 +49,8 @@ const groups = computed(() => [{
suffix: 'Create a new folder in the current directory or workspace.',
icon: 'i-heroicons-folder-plus',
onSelect(e: Event) {
e?.preventDefault()
e.preventDefault()
toast.add({ title: 'New folder added!' })
},
kbds: ['meta', 'F']
@@ -57,7 +59,8 @@ const groups = computed(() => [{
suffix: 'Add a hashtag to the current item.',
icon: 'i-heroicons-hashtag',
onSelect(e: Event) {
e?.preventDefault()
e.preventDefault()
toast.add({ title: 'Hashtag added!' })
},
kbds: ['meta', 'H']
@@ -66,7 +69,8 @@ const groups = computed(() => [{
suffix: 'Add a label to the current item.',
icon: 'i-heroicons-tag',
onSelect(e: Event) {
e?.preventDefault()
e.preventDefault()
toast.add({ title: 'Label added!' })
},
kbds: ['meta', 'L']